Drop down box selenium
I have a drop down box with the id = PoolsSelect. I am trying to select the value within that drop down box but I'm getting an error, here is my code:
RenderedWebElement element = (RenderedWebElement) driver.findElement(By.id("PoolsSelect"));
RenderedWebElement target = (RenderedWebElement) driver.findElement(By.name("Austria"));
element.dragAndDropOn(target);
and the 开发者_运维问答error I get is
Error: Unable to find element by name using "PoolsSelect" (7)
I am using selenium 2.07a with JUnit 4.8.2.
You say the id of the select is PoolsSelect
but yet you're using a By.name selector. Have you tried selecting by id?
精彩评论