The same commands should be accessible via Remote driver as well since Grid provides the endpoints and the underlying command executor actually already supports the commands:
from selenium.webdriver.chrome.options import Options
from selenium.webdriver import Remote
driver = Remote(options=Options())
driver.execute_cdp_cmd('Page.enable') # <-- this method is not available
driver.execute("executeCdpCommand", {"cmd": "Page.enable', "params": {}}) # <-- this still works!
The same approach is implemented in other bindings (Java, Ruby), where instances of Remote driver are augmented to support custom methods and commands specific to browsers.
Feature and motivation
Currently there is a number of custom methods that expose Chromium commands in Chromium driver:
The same commands should be accessible via Remote driver as well since Grid provides the endpoints and the underlying command executor actually already supports the commands:
The same approach is implemented in other bindings (Java, Ruby), where instances of Remote driver are augmented to support custom methods and commands specific to browsers.
Usage example
See above for usage example.