New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for sending Chrome DevTools commands #556
Conversation
34a2b50
to
ecf11c1
Compare
@OndraM is there anything I could do to help move this PR forward? |
62a68cb
to
de2ae1a
Compare
de2ae1a
to
a5a924f
Compare
After a further consideration, I think this may need a different approach. Lets wait with finishing it after 1.9.0. However executing ChromeDevTools protocol is possible since php-webdriver 1.8.0 via custom commands: Send command: $driver->executeCustomCommand(
'/session/:sessionId/goog/cdp/execute',
'POST',
['cmd' => 'Performance.enable']
); Send command and receive result: $metrics = $driver->executeCustomCommand(
'/session/:sessionId/goog/cdp/execute',
'POST',
['cmd' => 'Performance.getMetrics']
); Send command with parameters and receive result: $return = $driver->executeCustomCommand(
'/session/:sessionId/goog/cdp/execute',
'POST',
['cmd' => 'Runtime.evaluate', 'params' => ['expression' => 'window.location.toString()']]
); |
Also the endpoint URL was meanwhile changed in chromium to https://bugs.chromium.org/p/chromedriver/issues/detail?id=2307 |
✔️ This feature is now merged and documented in our wiki with examples. |
ChromeDriver has two endpoints for calling the DevTools API. This PR adds support for calling these endpoints (sending DevTools commands) using php-webdriver.