Options not applied to Chrome in Selenium 4
See original GitHub issue💥 Regression Report
It seems that options are not applied properly to Chrome driver anymore in Selenium 4.
Last working Selenium version
Worked up to version: 3.141.0
Stopped working in version: 4.0.0.b1
To Reproduce
Detailed steps to reproduce the behavior:
>>> from selenium import webdriver
>>> options = webdriver.ChromeOptions()
>>> options.add_argument('--headless')
>>> options.add_argument('--window-size=1800,800')
>>> driver = webdriver.Chrome(options=options)
Expected behavior
I would expect Chrome to start in headless mode with the right window size, but it seems that the chosen options are ignored.
Perhaps the options need to be specified differently in 4.0 but I have not been able to find any documentation on that.
Environment
OS: Ubuntu 20.04 LTS Browser: Chrome Browser version: 89.0.4389.82 (Official Build) (64-bit) Browser Driver version: ChromeDriver 89.0.4389.23 Language Bindings version: Python 4.0.0.b1
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Upgrading from Selenium 3.11.0 to 4.0.0 can't find Chrome ...
In Selenium 4, DesiredCapabilities have been replaced by Options. To use the Driver class, QAs have to create an Options class, set test ......
Read more >Chrome Options & Desired Capabilities in Selenium Webdriver
The Chrome options class is generally used in conjunction with Desired Capabilities for customizing Chrome driver sessions. It helps you perform ...
Read more >Browser Options - Selenium
As of Selenium 4, you must use the browser options classes. For remote driver sessions, a browser options instance is required as it ......
Read more >Set Chrome Options for Selenium Tests. | BrowserStack Docs
Set Chrome Options. Customize and configure ChromeDriver sessions for Selenium tests on BrowserStack Automate. A ChromeDriver session i.e. a test running on ...
Read more >Chrome WebDriver Options - Tutorialspoint
add_experimental_option(n, val) − It is used to append an experimental option which is passed to the Chrome browser. add_extension(ext) − It is used...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@GergelyKalmar We hope to have b2 released in the next couple of days.
That would be wonderful! Thank you.