leochabi / selenium-vba

Automatically exported from code.google.com/p/selenium-vba
0 stars 1 forks source link

Need to select Dropdown value using test displayed as values #52

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Operating system : Win 7
.Net Framework version : Not Sure(but it includes lot of technologies like 
Telerik, Kondo UI, Ajax, Html5 )
Office Version : 2010
SeleniumWrapper version : Latest

What is your issue ?

Not able to select values displayed in dropdown using:

Driver.findElementByXPath("//form[@id='frmTransfer']/div/span/span/span[2]/span"
).AsSelect.selectByText "Payments"

in HTML it's like this
<li tabindex="-1" role="option" unselectable="on" class="k-item">Payments</li>

Please do let me know in case you require more information.

Original issue reported on code.google.com by contactn...@gmail.com on 7 Feb 2014 at 8:17

GoogleCodeExporter commented 8 years ago
Also, I am doing all this in Excel using VBA.

Original comment by contactn...@gmail.com on 7 Feb 2014 at 8:19

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Be aware that in you example, the attribute "unselectable" is "on", meaning you 
shouldn't be able to select it even manually.
Moreover your XPath should be ending with a "ul" or "ol" tag as it looks to be 
a list item.
I suggest you first to identify the right XPath to the ul or ol list.
You can also try to click the list element directly:
driver.findElementByXPath("//form[@id='frmTransfer']/div/span/span/span[2]/span/
/li[text()='Payments']").click

Original comment by florentbr on 7 Feb 2014 at 9:16

GoogleCodeExporter commented 8 years ago

Original comment by florentbr on 8 Sep 2014 at 5:40