I'm trying to select an element that contains a partial text from a drop down menu. e.g. If I have an element like "12 streetname town" in a drop down menu and I try to select it like this:
<td>select</td>
<td>//option[contains(text(),'12')]</td>
<td></td>
or:
<td>select</td>
<td>//*[contains(@id,'my_id')]/option[contains(text(),'12')]
<td></td>
I get:
[error] Specified element is not a Select (has no options)
but If I select the element like this:
<td>select</td>
<td>//*[contains(@id,'my_id')]</td>
<td>value=12 streenname town</td>
it works.
So how can I select an element only by partial text?
Thanks!
Aucun commentaire:
Enregistrer un commentaire