CDP с удаленным веб-драйвером. Объект «WebDriver» не имеет атрибута «execute_cdp_cmd» Python ⇐ Python
CDP с удаленным веб-драйвером. Объект «WebDriver» не имеет атрибута «execute_cdp_cmd» Python
I'm trying to run tests with CDP,
webdriver.execute_cdp_cmd('Network.enable', {}) with Remote webdriver (in Selenoid). But getting this error:
AttributeError: 'WebDriver' object has no attribute 'execute_cdp_cmd'. In local environment it works fine. I've tried to use Selenium 3.141.0 and 4.1.3.
I'm familiar with PyCDP documentation (https://py-cdp.readthedocs.io/en/latest ... arted.html) but I didn't figured out how to properly use it.
Why it does not work with Remote webdriver? Do someone have an example of executing CDP commands using python in Selenium 4?
I use following capabilities, :
capabilities = { 'loggingPrefs': {'browser': 'ALL'}, 'goog:loggingPrefs': {'performance': 'ALL'}, "browserName": "chrome", "browserVersion": "99.0", "selenoid:options": { "enableVNC": True, "enableVideo": False } }
if request.config.getoption('--remote'): driver = webdriver.Remote(command_executor='selenoid.dev:4444/wd/hub', desired_capabilities=capabilities, options=options)
Источник: https://stackoverflow.com/questions/721 ... te-cdp-cmd
I'm trying to run tests with CDP,
webdriver.execute_cdp_cmd('Network.enable', {}) with Remote webdriver (in Selenoid). But getting this error:
AttributeError: 'WebDriver' object has no attribute 'execute_cdp_cmd'. In local environment it works fine. I've tried to use Selenium 3.141.0 and 4.1.3.
I'm familiar with PyCDP documentation (https://py-cdp.readthedocs.io/en/latest ... arted.html) but I didn't figured out how to properly use it.
Why it does not work with Remote webdriver? Do someone have an example of executing CDP commands using python in Selenium 4?
I use following capabilities, :
capabilities = { 'loggingPrefs': {'browser': 'ALL'}, 'goog:loggingPrefs': {'performance': 'ALL'}, "browserName": "chrome", "browserVersion": "99.0", "selenoid:options": { "enableVNC": True, "enableVideo": False } }
if request.config.getoption('--remote'): driver = webdriver.Remote(command_executor='selenoid.dev:4444/wd/hub', desired_capabilities=capabilities, options=options)
Источник: https://stackoverflow.com/questions/721 ... te-cdp-cmd
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Python – AttributeError: объект «WebDriver» не имеет атрибута «launch_app»
Anonymous » » в форуме Python - 0 Ответы
- 72 Просмотры
-
Последнее сообщение Anonymous
-
-
-
AttributeError: объект «WebDriver» не имеет атрибута «find_element_by_xpath»
Anonymous » » в форуме Python - 0 Ответы
- 54 Просмотры
-
Последнее сообщение Anonymous
-
-
-
AttributeError: объект «WebDriver» не имеет атрибута «find_element_by_class_name»
Anonymous » » в форуме Python - 0 Ответы
- 28 Просмотры
-
Последнее сообщение Anonymous
-