How to disable javascript in Chrome Driver Selenium Python

前端 未结 4 1936
不知归路
不知归路 2020-12-16 08:00

How can I disable Java Script in Selenium\'s Chrome Driver using python

4条回答
  •  囚心锁ツ
    2020-12-16 08:50

    If you're using Nightwatch.js, the configuration you have to use is

    var CHROME_CONFIGURATION = {
        browserName: 'chrome',
        "chromeOptions" : {
            "prefs" : {
                'profile.managed_default_content_settings.javascript': 2
            }
        }
    };
    

提交回复
热议问题