Disable JavaScript on browsers when getting remote webdriver

别来无恙 提交于 2020-01-06 07:54:11

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!