'How to install ChromeDriver on Azure app serveice (Linux)
I implemented Java code to scrape data using chromedriver. My OS is Windows and the app service that I have is Linux. I put both chromedriver.exe (for windows) and chromedriver (for linux) in the resources folder. I am able to run the code on Windows locally and it works but when I try to run the scraper on app service, it gives me an error as:
lang.IllegalStateException: The driver executable does not exist: /src\main\resources\chromedriver
Code trials:
System.setProperty("webdriver.chrome.driver", "src\\main\\resources\\chromedriver");
WebDriver driver = new ChromeDriver();
JavascriptExecutor js = (JavascriptExecutor) driver;
Is there a way that I can install/move the driver to a place in linux that I be able to run my code in Azure?
Solution 1:[1]
As your OS is Windows and the app service is Linux based, keeping both chromedriver.exe (for windows) and chromedriver (for linux) in the resources folder isn't a recommended practice.
Tests should be either windows based or linux based. So only the optimum resources should only be shared within the resources directory.
The bottom line is, if chromedriver.exe is not a part of your tests, you should totally remove it from the resources directory and execute your tests with the recommended executables/libraries.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | undetected Selenium |
