RE: Not able to select an element from the suggestions list displayed

Hi,

Below are the steps:
1. open http://www.indeed.co.in/
2. enter mob in what
3. need to select mobile application testing from drop down

Tried with different selectors
driver.findElement(By.id(“what”)).sendKeys(“mob”);
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
driver.switchTo().frame(driver.findElement(By.id(“what_acacbgif”)));
driver.findElement(By.xpath(“//*[@id=’what_acdiv’]/div[2]/b”)).click();
driver.findElement(By.xpath(“//[*text()=’mobile application testing’]”).click();

please let me know the right way to perform the action.

raghunadh Default Asked on October 17, 2014 in Selenium WebDriver.
Add Comment
1 Answers

Hi,

Issue solved by removing the driver.switchTo().frame();

Thanks

Default Answered on October 17, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.