Enable execute_cdp for webdriver.Remote ?
See original GitHub issue🚀 Feature Proposal
Can we enable execute_cdp for driver instance from webdriver.Remote()?
currently we are getting an Attribute Error for the following
Requiremnts
Python 3.6.9
selenium 3.141.0
from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--no-sandbox")
driver = webdriver.Remote(
command_executor='https://remote/webdriver',
desired_capabilities=chrome_options.to_capabilities()
)
driver.execute_cdp_cmd("execute something")
AttributeError: 'WebDriver' object has no attribute 'execute_cdp_cmd'
Motivation
Already execute_cdp_cmd is availbe for selenium.webdriver.chrome.webdriver
https://www.selenium.dev/selenium/docs/api/py/webdriver_chrome/selenium.webdriver.chrome.webdriver.html#selenium.webdriver.chrome.webdriver.WebDriver.execute_cdp_cmd
Example
driver.execute_cdp_cmd(“execute something”)
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Selenium Chrome DevTools Protocol (CDP) API - Applitools
The executeCdpCommand() method is available directly from ChromiumDriver (and its descendent classes). The purpose of this method is to allow ...
Read more >Chrome DevTools - Selenium
While Selenium 4 provides direct access to the Chrome DevTools Protocol (CDP), ... Emulate Geo Location with the Remote WebDriver:.
Read more >CDP with Remote webdriver. 'WebDriver' object has no ...
I'm trying to run tests with CDP, webdriver.execute_cdp_cmd('Network.enable'Â ...
Read more >New Feature Selenium 4 Chrome DevTools Protocol For ...
Selenium 4 Grid Tutorial with examples - Parallel execution in Remote Machines · Selenium GRID on Machines/Cloud/VMs/Docker/BrowserStack/ ...
Read more >How To Use Chrome DevTools Protocol (CDP) In Selenium 4
Are you aware of the “Pin Script” feature in Selenium 4? If not, then this video is for you as it gives an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Hashnode Post
No results found
A workaround would be using this function:
source: https://stackoverflow.com/a/47298910/8524395
@AutomatedTester Could you point to where that is? Having trouble finding the python definition