简体   繁体   中英

Click on hidden elements with Selenium java WebDriver, without using the javascript executor?

Is it possible to click on hidden/non-visible elements, using the selenium java webdriver, without using the JavaScript executor to click via JavaScript? The tests I'm performing are in a browser with JavaScript disabled, which is why I can't use the jse.

Selenium is meant to replicate the end user's behavior. Since any end user cannot do anything with the hidden element it's not realistic to interact with hidden elements directly. See this answer.

So, the answer is No there is no way without the javascript executor. Selenium does not interact with the hidden element directly

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM