Unable to access chrome runtime using selenium and chrome headless mode
Reported by
apar...@gmail.com,
Aug 23 2017
|
||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36
Steps to reproduce the problem:
1. Run the following F# code:
let chromeOptions = new ChromeOptions(BinaryLocation = _chromium)
chromeOptions.AddArguments
(
"--headless",
"--disable-gpu"
)
let chrome = new ChromeDriver(chromeOptions, Url = "http://www.example.com")
try
Console.WriteLine(chrome.Capabilities.Platform)
Console.WriteLine(chrome.Capabilities.BrowserName)
Console.WriteLine(chrome.Capabilities.Version)
let res = chrome.ExecuteScript("return chrome;")
Console.WriteLine(res)
with e ->
Console.WriteLine(e.Message)
chrome.Quit()
What is the expected behavior?
Starting ChromeDriver 2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8) on port 60248
Only local connections are allowed.
Any
chrome
62.0.3188.0
System.Collections.Generic.Dictionary`2[System.String,System.Object]
What went wrong?
Starting ChromeDriver 2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8) on port 61158
Only local connections are allowed.
Any
chrome
62.0.3188.0
unknown error: chrome is not defined
(Session info: headless chrome=62.0.3188.0)
(Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Windows NT 10.0.15063 x86_64)
Did this work before? No
Chrome version: 62.0.3188.0 Channel: n/a
OS Version: 10.0
Flash Version:
This problem arise only when Chrome is launched with the headless option. Without that option it works fine.
,
Aug 25 2017
,
Aug 28 2017
Sorry, I'm not sure what's the best way to reproduce, could you provide the project info to execute your code?
,
Aug 28 2017
chrome is the object to access chrome extension api. In headless chrome, we don't support extension for now.
,
Aug 28 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by hdodda@chromium.org
, Aug 25 2017Labels: Needs-Triage-M62 TE-NeedsTriageHelp