I have tried so many times. It launches a browser but doesn't perform any other tasks. I am using Java 1.8 , chrome Version 80.0.3987.149 (Official Build) (64-bit), chrome driver version 80.0.3987.149. I don't know what's wrong I am doing.
Asked
Active
Viewed 483 times
0
-
the "please protect ports" message is normal. (The timeout message is the problem...) What you are seeing here might be due to anti-virus or firewall software. Do you have anything like that installed on the machine? – pcalkins Mar 30 '20 at 20:17
-
...also check your task manager for currently running chromedrivers/chrome instances before running... sometimes this can be caused by orphaned processes. (or not waiting for one closed browser to finish it's cleanup process....) – pcalkins Mar 30 '20 at 20:58
-
Does this answer your question? [Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code](https://stackoverflow.com/questions/55069656/please-protect-ports-used-by-chromedriver-and-related-test-frameworks-to-prevent) – Walshy Mar 30 '20 at 22:10
-
I have cleared from Task Manager and I have disabled antivirus still not able to do that .. I am receiving "Timed out receiving message from renderer: 0.100" error – Mani4Sep Mar 30 '20 at 22:27
-
I would try reverting the driver to v79. v80 was a little buggy. If that doesn't help add your full initialization code to your post. (avoid using screenshots) – pcalkins Mar 31 '20 at 17:25
1 Answers
0
The best way to create chrome driver is by using chrome service with allocating free ports.
private static ChromeDriverService service;
private WebDriver driver;
@BeforeClass
public static void createAndStartService() throws IOException {
service = new ChromeDriverService.Builder().usingDriverExecutable(new File("/path/to/chromedriver")).usingAnyFreePort().build();
service.start();
driver = new RemoteWebDriver(service.getUrl(), new ChromeOptions());
}

Nael Marwan
- 1,030
- 1
- 13
- 32