Hi Bryan,

If it is a Select drop down then use the Select class to select the drop
down like elow.

// Locate drop-down field
    Select select = new Select(getDriver().findElement(Locator));
    // Select value from drop-down by visibility text
    select.selectByVisibleText("the text that you want to select");

If it does not work then let me know we can do using Action class.

Note: The above code will only work if the above dropdown is a select type


On Wednesday, April 29, 2015 at 6:57:54 PM UTC+5:30, Bryan Kardisco wrote:

I'm attempting to select a drop-down box with the Firefox Driver and am
being told the element is hidden. However, when opening the URL the link
is there and can be clicked.

I am doing the following:

WebElement inputElement = driver

Object obj = ((JavascriptExecutor) driver)

new Select(inputElement).selectByIndex(2);

Anything else I can do?
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/740fd015-058d-4358-9796-58e2a3c66a77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 5 | next ›
Discussion Overview
groupselenium-users @
postedApr 29, '15 at 1:27p
activeApr 30, '15 at 6:37p



site design / logo © 2022 Grokbase