not able to select hidden link - selenium

Posted by Maddy on Stack Overflow See other posts from Stack Overflow or by Maddy
Published on 2013-06-25T02:35:22Z Indexed on 2013/06/25 16:21 UTC
Read the original article Hit count: 189

Filed under:
|
|
|

I have to select web link when i mouse hover to particular frame in the webpage, the button(link to next page) will be visible.

WebElement mainElement = driver.findElement(By.xpath(<frame xpath >));

Actions builder = new Actions(driver);
builder.moveToElement(mainElement);
WebElement button1 = driver.findElement(By.xpath("//*[@id='currentSkills']/div[1]/div/a"));
builder.moveToElement(button1).click().perform();

I am still unable to select the particular link when i execute, the following error am getting org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be interacted with (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 131 milliseconds

But when i hover mouse pointer to the particular frame during AUT(just to move to particular frame without clicking anything), then test is executing sucessfully.

I know this can be handled by JS. But i want to find out is there any solution within selenium webdriver

Your help is much appreciated...

Thanks Madan

© Stack Overflow or respective owner

Related posts about java

Related posts about selenium