FAQ
Hi All,

I am able to select from the Select class using Action class like below.

Actions action = new Actions(driver);
action.moveToElement(driver.findElement(By.xpath("//input[@type='checkbox']"))).sendKeys(Keys.TAB).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ENTER).build().perform();

but my concern is why it is unable to select from that Select dropdown
using Select class? There are other Select dropdown but i am able to select
using the Select class only.

Thanks,

Sudhansu





On Friday, 3 April 2015 17:45:22 UTC+5:30, Sudhansu Sekhar panda wrote:

Hi All,

I am unable to select from a Select dropdown. I have tried using the below
code but it didnt work for me.

Select select = new Select(driver.findElement(Locator));
select.selectByVisibleText(Option);

Also I tried by Index but it didnt work. I debugged and got the below
error message.

"Executing JavaScript click function returned an unexpected error"

Note: The interesting part it is running fine in my local IE10 but while
running from remote machine its not working and showing the above error
message.

Is there any alternative way to do this?

The Html content for the Select item
<select id="myModal" class="span12 " isrequired="true" field-validate=""
ng-options="loc.dbid as loc.serviceName for loc in locList() |
orderBy:'name'" ng-model="" uid="t" title="">
<option id="unselectedLocOption" class="" value=""
uid="unselectedLocOption">-- * Requested LOC: --</option>
<option value="0">P</option>
<option value="1">S/ Chronic</option>
<option value="2">SN / Long Term Care</option>
<option value="3">She</option>
<option value="4">Ski</option>
<option value="5">Sub</option>
</select>


Thanks,

Sudhansu
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/36d180f8-1bc4-4367-8bd6-1469ef7893bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 5 | next ›
Discussion Overview
groupselenium-users @
categoriesselenium
postedApr 3, '15 at 12:15p
activeApr 8, '15 at 4:19a
posts5
users3
websiteseleniumhq.org

People

Translate

site design / logo © 2021 Grokbase