I have been using Selenium webdriver for a long time for automation stuffs. The PhantomJS driver(which is now deprecated) was an awesome way to do headless automation as well as you don't need to match the driver version with the browser as in the case of chromedriver and chrome browser. I know that chromedriver and firefox drivers both can be used with headless feature enabled but the problem is that the drivers of both of them needs to be consistently upgraded and match the current browser version of the os. Please help me.
Also I would love to hear if there any other way I can do headless web automation without any dependecies(standalone).
The programming languages related to my question are: 1. Python 2. C# 3. VB.net 4. Java
If anyone has any idea or any way in any of the four languages or any other language than them, then please leave your anser.
As you mentioned
But you can eliminate that issue by using web-driver manager. Because of this Even you don't need to download chromedriver.exe manually.
`WebDriverManager.chromedriver().setup();
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--no-sandbox");
chromeOptions.addArguments("--headless");
chromeOptions.addArguments("disable-gpu");`
Web driver manager dependency
`<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>3.6.2</version>
</dependency>`
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments