question

IgorLopatchin293174IT-6985 avatar image
0 Votes"
IgorLopatchin293174IT-6985 asked ryanchill commented

Web Job cannot find chromedriver.exe inside the project

I have created a Web Job, but for some reason Azure cannot find chromedriver.exe, even though the corresponded nuget package is added

azure-webapps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ryanchill avatar image
0 Votes"
ryanchill answered ryanchill commented

Hi @IgorLopatchin293174IT-6985,

It sounds like you're referring to Selenium.WebDriver.ChromeDriver nuget package. This normally ran on a local dev environment or build server that is executing a Web UI test suite. It isn't meant to be deployed with your application code or ran under a web job or app service.

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Okay, I understand. But I must use it, otherwise my Scrapper wouldn't work. What should I do? How can I add chromedriver.exe to my Web Job?

0 Votes 0 ·
ryanchill avatar image ryanchill IgorLopatchin293174IT-6985 ·

@IgorLopatchin293174IT-6985, I would check the relative path being loaded by your app when it tries to access chromedriver.exe. You can also try copying the exe to wwwroot/app_data/jobs per https://github.com/projectkudu/kudu/wiki/WebJobs#copying-files-directly-in-their-proper-location. If that doesn't work, try copying to the working directory.

1 Vote 1 ·

Thank you it helped. The chrome driver launched. But now I have another issue. Unhandled exception. OpenQA.Selenium.WebDriverException: unknown error: cannot find Chrome binary. How can I get rid of this error?

0 Votes 0 ·
Show more comments