How to fix “[SEVERE]: bind() failed: Cannot assign requested address (99)” while starting chromedriver

后端 未结 5 983
长发绾君心
长发绾君心 2020-12-06 10:52

I downloaded the latest version of chromedriver in Centos 7 platform: https://chromedriver.storage.googleapis.com/index.html?path=74.0.3729.6/ I start chromedriver and get

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-06 11:21

    The cause lay somewhere else. I was running chrome on docker container and for me this was solved when the driver was run in a headless mode.

    ChromeOptions options = new ChromeOptions().setHeadless(true); WebDriver driver = new ChromeDriver(options);

    Results: Now tests run successfully, without any errors.

提交回复
热议问题