Closed lukeis closed 8 years ago
Moved to: Issue chromedriver:1064
Reported by barancev
on 2015-03-21 12:52:53
Moved
By the way, I can't reproduce the issue. Here is the code:
DesiredCapabilities desiredCapabilites = DesiredCapabilities.chrome();
LoggingPreferences logPrefs = new LoggingPreferences();
logPrefs.enable(LogType.PERFORMANCE, Level.ALL);
desiredCapabilites.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);
RemoteWebDriver driver = new RemoteWebDriver(desiredCapabilites);
try {
System.out.println(driver.manage().logs().getAvailableLogTypes());
driver.get("http://localhost/");
for (LogEntry logEntry : driver.manage().logs().get(LogType.PERFORMANCE).getAll())
{
System.out.println(logEntry);
}
} finally {
driver.quit();
}
The console output on the server side:
16:50:13.005 INFO - Executing: [new session: Capabilities [{loggingPrefs=org.ope
nqa.selenium.logging.LoggingPreferences@64bb5a5e, browserName=chrome, version=,
platform=ANY}]])
16:50:13.006 INFO - Creating a new session for Capabilities [{loggingPrefs=org.o
penqa.selenium.logging.LoggingPreferences@64bb5a5e, browserName=chrome, version=
, platform=ANY}]
Starting ChromeDriver 2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf) on
port 19863
Only local connections are allowed.
16:50:15.631 INFO - Done: [new session: Capabilities [{loggingPrefs=org.openqa.s
elenium.logging.LoggingPreferences@64bb5a5e, browserName=chrome, version=, platf
orm=ANY}]]
16:50:15.653 INFO - Executing: [fetching available log types])
16:50:15.660 INFO - Done: [fetching available log types]
16:50:15.739 INFO - Executing: [get: http://localhost/])
16:50:29.728 INFO - Done: [get: http://localhost/]
16:50:29.753 INFO - Executing: [fetching logs for: performance])
16:50:29.798 INFO - Done: [fetching logs for: performance]
16:50:29.904 INFO - Executing: [delete session: 538d4407-d685-4292-a519-01aa25f0
d412])
16:50:31.040 INFO - Done: [delete session: 538d4407-d685-4292-a519-01aa25f0d412]
The console output on the client side:
[performance, browser, driver, client, server]
[2015-03-21T16:50:20+0400] [INFO] {"message":{"method":"Network.responseReceived","params":{"frameId":"28480.1","loaderId":"28480.2","requestId":"28480.1","response":{"connectionId":0,"connectionReused":false,"encodedDataLength":-1,"fromDiskCache":false,"fromServiceWorker":false,"headers":{"Access-Control-Allow-Origin":"*","Content-Type":"text/plain;charset=US-ASCII"},"mimeType":"text/plain","protocol":"data","status":200,"statusText":"OK","url":"data:,"},"timestamp":1426942217.5344,"type":"Other"}},"webview":"C359224A-06E5-42B6-8D1B-52687733920A"}
[2015-03-21T16:50:20+0400] [INFO] {"message":{"method":"Network.loadingFinished","params":{"encodedDataLength":0,"requestId":"28480.1","timestamp":1426942217.5344}},"webview":"C359224A-06E5-42B6-8D1B-52687733920A"}
[2015-03-21T16:50:20+0400] [INFO] {"message":{"method":"Page.frameNavigated","params":{"frame":{"id":"28480.1","loaderId":"28480.2","mimeType":"text/plain","securityOrigin":"://","url":"data:,"}}},"webview":"C359224A-06E5-42B6-8D1B-52687733920A"}
[2015-03-21T16:50:21+0400] [INFO] {"message":{"method":"Page.loadEventFired","params":{"timestamp":1426942220.99924}},"webview":"C359224A-06E5-42B6-8D1B-52687733920A"}
[2015-03-21T16:50:21+0400] [INFO] {"message":{"method":"Page.frameStoppedLoading","params":{"frameId":"28480.1"}},"webview":"C359224A-06E5-42B6-8D1B-52687733920A"}
[2015-03-21T16:50:21+0400] [INFO] {"message":{"method":"Page.domContentEventFired","params":{"timestamp":1426942220.99927}},"webview":"C359224A-06E5-42B6-8D1B-52687733920A"}
....
Reported by barancev
on 2015-03-21 12:56:02
Can you try instantiating the RemoteWebDriver with the constructor containing a remote
URL like my example? Selenium is hosted elsewhere; otherwise, I would just use the
ChromeDriver instantiation.
public RemoteWebDriver(java.net.URL remoteAddress, Capabilities desiredCapabilities)
Reported by email@stephencopp.com
on 2015-03-21 16:58:00
new RemoteWebDriver(desiredCapabilites)
is equivalent to
new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), desiredCapabilites)
see
https://github.com/SeleniumHQ/selenium/blob/master/java/client/src/org/openqa/selenium/remote/HttpCommandExecutor.java#L70-L72
Unfortunately I can't try MacOS, may be it is platform-specific issue.
Reported by barancev
on 2015-03-22 08:31:03
This is not platform specific; I can repo it on both Mac and Windows.
This occurs when using the Selenium Grid, typically a remote URL, not a localhost URL.
To reproduce locally:
Start a selenium grid locally:
java -jar selenium-server-standalone-2.45.0.jar -role node -hub http://localhost:4444/grid/register
-browser browserName=chrome,maxInstances=1
Start a selenium node locally:
java -jar selenium-server-standalone-2.45.0.jar -role hub
Run your same scenario again:
DesiredCapabilities desiredCapabilites = DesiredCapabilities.chrome();
LoggingPreferences logPrefs = new LoggingPreferences();
logPrefs.enable(LogType.PERFORMANCE, Level.ALL);
desiredCapabilites.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);
RemoteWebDriver driver = new RemoteWebDriver(desiredCapabilites);
try {
System.out.println(driver.manage().logs().getAvailableLogTypes());
driver.get("http://localhost/");
for (LogEntry logEntry : driver.manage().logs().get(LogType.PERFORMANCE).getAll())
{
System.out.println(logEntry);
}
} finally {
driver.quit();
}
Reported by stephencopp
on 2015-03-23 16:13:52
Reported by gmanikpure@chromium.org
on 2015-03-23 17:34:50
Untriaged
Reproduced
Reported by barancev
on 2015-03-28 17:45:57
Accepted
Reported by barancev
on 2015-03-28 17:45:58
Accepted
Reported by barancev
on 2015-03-28 17:46:54
Fixed by https://github.com/SeleniumHQ/selenium/commit/01bf9a0372b98a50026b6a4411504ce8341f3c51
Reported by barancev
on 2015-03-28 19:29:39
Fixed
exellent, thank you!
Reported by email@stephencopp.com
on 2015-03-30 15:51:59
Reported by luke.semerau
on 2015-09-17 18:25:11
Originally reported on Google Code with ID 8457
Reported by
email@stephencopp.com
on 2015-02-04 17:06:52