WebdriverIO:-如何在已打开的浏览器中执行selenium脚本

2023-12-20

我知道通过在 webdriver 中设置 chromeOption setExperimentalOption("debuggerAddress","localhost:1234") 来在已打开的浏览器中执行脚本。 我想在 WebdriverIO 中实现这一点。 是否可以?


https://chromedriver.chromium.org/capability https://chromedriver.chromium.org/capabilities

你可以看到 debuggerAddress 是一个 chrome 选项,所以你可以这样做:

capabilities: [
       {
            
            "goog:browserName": "chrome",
    
            "goog:chromeOptions": {
                "debuggerAddress": "localhost:1234"
    
            }
    
    }]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

WebdriverIO:-如何在已打开的浏览器中执行selenium脚本 的相关文章

随机推荐