power_settings_new

Is there a way to click hidden LINK in web driver?

by (324 points)
+1 vote
58 views

Is there a way to click hidden LINK in web driver?

explain with code

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

by (171 points)
+1 vote

You can try clicking on the link using custom JavaScript.

 

WebElement element = driver.findElement(By.id("Your id here"));
JavascriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("arguments[0].click();", element);

Hope that helps!

add
...