问题
How to disable JavaScript on IE, chrome, and maybe iPhone and android when getting remote WebDriver in selenium grid. I know how to do it on Firefox, but it seems different on all other browsers?
Thanks!
回答1:
Each browser has its own mechanism for disabling JavaScript. In IE, for example, this is handled via a setting in the Internet Options dialog. WebDriver cannot set these settings for IE. Furthermore, you'll find that WebDriver will have very little functionality with JavaScript disabled. WebDriver has come to rely heavily on so-called Automation Atoms, which are implemented as JavaScript functions for execution within the browser.
来源:https://stackoverflow.com/questions/11940302/disable-javascript-on-browsers-when-getting-remote-webdriver