Forum Discussion
Installing webdriver for selenium
This might be a challenge in Fabric. When using Selenium locally, WebDriver can launch a locally installed browser (such as Chrome) to visit websites. However, in Fabric, notebooks run in an Apache Spark-based environment, which is a virtual environment and may not have a specific browser that WebDriver can launch. Therefore, even if WebDriver is available, the goal cannot be achieved due to the lack of web browser.
I could reproduce the same error as you have got: "WebDriverException: Message: Service /home/trusted-service-user/.cache/selenium/chromedriver/linux64/131.0.6778.85/chromedriver unexpectedly exited. Status code was: 127".
According to the error message, it seems it already has a chromedriver which is linux version. When we are using Selenium v4.6 and above we don't need to explicitly download ChromeDriver, GeckoDriver or any browser drivers as such. Selenium Manager would help to get a working environment to run Selenium out of the box. So it has prepared the chromedriver for the Fabric environment. Therefore I guess the cause of failure is the lack of browser in the Fabric environment.
Update:
I read something about headless mode and browserless mode about Azure and Selenium, not sure if this could be applied to Fabric. I haven't tested this yet, to be honest.
c# - Run Selenium Chrome WebDriver on Azure Cloud Service? - Stack Overflow
How to Run Selenium Driver in Azure for Data Collection | by Illiyas K | Medium
Best Regards,
Jing
Community Support Team