python+selenium配置Edge浏览器
Chrome, Firefox只需要修改conftest.py文件中的
@pytest.fixture(scope='session')
def browser():
??? return BzwUtil.read_yml('config.yml','WEB_INFO','BROWSER')
''' add option in pytest command line '''
def pytest_addoption(parser):
??? parser.addoption("--browser", action="store", default="Firefox")
??? parser.addoption("--authentication", action="store", default="BZInternal")
??? parser.addoption("--data_source", action="store", default="BZInternal")
??? parser.addoption("--test_branch", action="store", default="Master")
??? parser.addoption("--bzw_server", action="store", default="localhost:8543")
?
而Edge需要按照如下操作
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ 執行該操作時,有可能需要用Run as AdministratorDISM.exe /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~0.0.1.0
轉載于:https://www.cnblogs.com/Raul2018/p/11089296.html
總結
以上是生活随笔為你收集整理的python+selenium配置Edge浏览器的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 61 相机投影原理、相机模型中的坐标系统
- 下一篇: vue请求简单配置