jeudi 17 décembre 2015

Select/click on checkbox by label

I have the following html code and would like to select checkbox by label:

  <input type="checkbox" onclick="searchResult(this,'8')" id="catalog-8"/>&nbsp;
    <label for="catalog-8">
    my-assortment </label>

in the above example, by the value "my-assortment"

I tried this : //label[containts('my-assortment')] but it does not work.

Does anybody have any idea?

Thank you in advance.

Aucun commentaire:

Enregistrer un commentaire