New issue
Advanced search Search tips
Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 13



Sign in to add a comment

Returned capabilities should include remote debugging port

Reported by simon.m....@gmail.com, Apr 11

Issue description

When starting a new session, currently only the driver version and the user data directory are returned. It would be helpful to also return the remote debugging port being used by to communicate with chrome.
 
Project Member

Comment 1 by johnchen@chromium.org, Apr 11

Labels: Pri-3
Status: Available (was: Unconfirmed)
Do you intend to have some other app communicating with Chrome through the remote debugging port? Please keep in mind that ChromeDriver isn't designed to share control of Chrome with another app.
The intent would be to allow selenium similar access to logs and internal events as offered by puppeteer. The intention would be to never send parallel requests to the port
Project Member

Comment 3 by johnchen@chromium.org, Jul 11

Labels: -Pri-3 Pri-2
Owner: johnchen@chromium.org
Status: Started (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/403b2e9ab1b7ebe8d476a38052fc8a242b9f7d1a

commit 403b2e9ab1b7ebe8d476a38052fc8a242b9f7d1a
Author: John Chen <johnchen@chromium.org>
Date: Thu Jul 12 18:24:19 2018

[ChromeDriver] Return debugging port in capabilities

Add a new entry chrome.debuggerAddress in the capabilities returned from
InitSession command. It contains the hostname and port to reach Chrome's
remote debugging port.

Also removed an unused constructor in struct BrowserInfo.

Bug:  chromedriver:2379 
Change-Id: Ic36c08eb7fe42b27fa1ba796ee10c511d76ef804
Reviewed-on: https://chromium-review.googlesource.com/1133421
Reviewed-by: Caleb Rouleau <crouleau@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574640}
[modify] https://crrev.com/403b2e9ab1b7ebe8d476a38052fc8a242b9f7d1a/chrome/test/chromedriver/chrome/browser_info.cc
[modify] https://crrev.com/403b2e9ab1b7ebe8d476a38052fc8a242b9f7d1a/chrome/test/chromedriver/chrome/browser_info.h
[modify] https://crrev.com/403b2e9ab1b7ebe8d476a38052fc8a242b9f7d1a/chrome/test/chromedriver/chrome/devtools_http_client.cc
[modify] https://crrev.com/403b2e9ab1b7ebe8d476a38052fc8a242b9f7d1a/chrome/test/chromedriver/session_commands.cc

Project Member

Comment 5 by johnchen@chromium.org, Jul 13

Labels: ChromeDriver-2.41 ToBeReleased
Status: Fixed (was: Started)
Starting with the upcoming ChromeDriver 2.41, Chrome's remote debugging port will be included in the capabilities returned from ChromeDriver to the app, at the path goog:chromeOptions.debuggerAddress (identical to the path used to specify remote debugging port in the capabilities sent from app to ChromeDriver). The format of the string is "hostname:port", e.g., "localhost:12345".

Here is a sample Python code fragment to retrieve remote debugging port:

driver = webdriver.Chrome()
print(driver.capabilities['goog:chromeOptions']['debuggerAddress'])
Fantastic news. Thank you!
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 20

Labels: merge-merged-3440
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/629843e7aae3822f2f196e5c8fd230fd9867d847

commit 629843e7aae3822f2f196e5c8fd230fd9867d847
Author: John Chen <johnchen@chromium.org>
Date: Fri Jul 20 17:51:40 2018

[ChromeDriver] Return debugging port in capabilities

Add a new entry chrome.debuggerAddress in the capabilities returned from
InitSession command. It contains the hostname and port to reach Chrome's
remote debugging port.

Also removed an unused constructor in struct BrowserInfo.

TBR=crouleau@chromium.org

Bug: 865982,  chromedriver:2379 
Change-Id: Ic36c08eb7fe42b27fa1ba796ee10c511d76ef804
Reviewed-on: https://chromium-review.googlesource.com/1133421
Reviewed-by: Caleb Rouleau <crouleau@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#574640}(cherry picked from commit 403b2e9ab1b7ebe8d476a38052fc8a242b9f7d1a)
Reviewed-on: https://chromium-review.googlesource.com/1144063
Reviewed-by: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/branch-heads/3440@{#728}
Cr-Branched-From: 010ddcfda246975d194964ccf20038ebbdec6084-refs/heads/master@{#561733}
[modify] https://crrev.com/629843e7aae3822f2f196e5c8fd230fd9867d847/chrome/test/chromedriver/chrome/browser_info.cc
[modify] https://crrev.com/629843e7aae3822f2f196e5c8fd230fd9867d847/chrome/test/chromedriver/chrome/browser_info.h
[modify] https://crrev.com/629843e7aae3822f2f196e5c8fd230fd9867d847/chrome/test/chromedriver/chrome/devtools_http_client.cc
[modify] https://crrev.com/629843e7aae3822f2f196e5c8fd230fd9867d847/chrome/test/chromedriver/session_commands.cc

Project Member

Comment 8 by johnchen@chromium.org, Jul 30

Labels: -ToBeReleased

Sign in to add a comment