I'm trying to execute remote selenium tests via Azure.
To do this, I used https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/QuickStartTemplates/201-dtl-create-lab-with-seleniumgrid
I create a custom template with the selenium server standalone jar file and installed the Chocolatey Packages, which contains the node and hub artifacts.
I started the virtual machines (the hub and the node). And downloaded the java standalone jar file manually in each vm, and at the command prompt I started each one with the proper commands:
Hub:
java -jar selenium-server-standalone-3.11.0.jar -role hub
And the hub gave me an IP for the node to connect. (For this example I'll use: 10.0.0.2)
Node
java -Dwebdriver.chrome.driver="C:\tryGrid\chromedriver.exe" -jar selenium-server-standalone-3.11.0.jar -role node -hub http://10.0.0.2:4444/grid/register/
But the node couldn't connect to the hub.
So I search in azure forums to solve this problem. I found that I had to add the artifacts. So, in Azure, I went to the DevTest Lab resource I've created, look for every vm and inspect the artifacts. In this case: Manage Artifacts section. Here I found that Selenium-grid hub and Selenium-grid node had an error showed in the Implementation Message.
Hub:
The resource operation completed with terminal provisioning state 'Failed'. VM has reported a failure when processing extension 'customScriptArtifact-183362431'. Error message: "Finished executing command".
Extension Message:
Executing script GridDeployer.ps1
Parameters ---------- Role: hub ConfigFile: testhub SeleniumGridJarFile: https://seleniumserverstandalonejardow
SeleniumGridJarFileName: s4o9Vx Successfully downloaded the SeleniumGrid jar file from https://seleniumserverstandalonejardownload. Invoke-WebRequest : The remote name could not be resolved: 'testhub' At C:\Packages\Plugins\Microsoft.Compute.CustomScriptExtension\1.9\Downloads\2\ PublicRepo\master\b8dcb684950157e2f6c44e9774ad70f0b27443d3\Artifacts\windows-se leniumgrid-hub\scripts\GridDeployer.ps1:58 char:5 + Invoke-WebRequest -Uri $configFile -OutFile "$PWD\$configFileName" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:Htt pWebRequest) [Invoke-WebRequest], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe
ll.Commands.InvokeWebRequestCommand
So I don't now what I should do. Help!
PS. I've work with these node and hub configuration in local machines and It works awesome, but the problem is when I want to execute it with azure VMs