I've written a C# Azure cloud service that uses Selenium.WebDriver.ChromeDriver but it doesn't work when I deploy it to Azure (Locally it runs fine - probably because I have Chrome installed). I deploy chromedriver.exe with my service but it fails because chrome.exe isn't found. I've tried deploying a copy of chrome.exe but that didn't work. I also tried adding the GoogleChrome nuget package but this also didn't work.
Anyone know a way to get a C# azure service that uses Selenium/Chromedriver to work?
Common examples of grade conversion are: A+ (97–100), A (93–96), A- (90–92), B+ (87–89), B (83–86), B- (80–82), C+ (77–79), C (73–76), C- (70–72), D+ (67–69), D (65–66), D- (below 65).
Three things you'll need to get this to run on an Azure cloudservice
To add ChromeSetup.exe, right click on the name of your role beneath the cloud service and just "Add Item" and find where you downloaded the chrome installer last.
The startup task is added by going into the ServiceDefinition.cdef file--example from a recent project below.
<WorkerRole name="WebReportDownloader" vmsize="Small">
<Startup>
<Task commandLine="Initialization\Startup.cmd" executionContext="elevated" taskType="simple">
<Environment>
<Variable name="MyVersionNumber" value="1.0.0.0" />
</Environment>
</Task>
</Startup>
The script the above task calls is pretty simple and logging anything to a text file is optional from my reading:
ECHO The current version is %MyVersionNumber% >> "%TEMP%\StartupLog.txt" 2>&1
START ChromeSetup.exe
EXIT /B 0
Hopefully this saves you some of the grief I ran into while piecing together several resources...
I found another way of doing this without having to install Chrome - instead of using Chrome I ended up using Chromium.
For this I just downloaded the Chromium archive from https://chromium.woolyss.com/download/ then have it extract to my binaries directory - this still has Chrome.exe binary but doesn't need installing
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With