The post Webdriver | Selenium Grid | Remote Driver appeared first on TestMate.
]]>We must start a hub and register nodes on it to trigger executions:
Use the following command-line code to start a hub
java -jar selenium-server-standalone-3.11.0.jar -role hub
Use the following command-line code to register a node
java -jar selenium-server-standalone-3.11.0.jar -role node -hub http://192.168.2.1:4444/grid/register/ (Sample)
Remote driver for Chrome
'Directing the driver to use remote options for chrome
Call wd.UseChrome_RemoteOptions()
'Adding some remote options
Call wd.BrowserVersion_RemoteOptions("79.0.3945.88")
'Launch remote driver
Call wd.InitializeRemoteDriver("http://192.168.50.1:4444/wd/hub")
'Navigating to the URL
Call wd.NavigateToUrl("http://www.google.com")
Remote driver for IE
Call wd.UseInternetExplorer_RemoteOptions()
Call wd.InitializeRemoteDriver("http://192.168.50.1:4444/wd/hub")
Call wd.NavigateToUrl("http://www.google.com")
Remote driver for Firefox
Call wd.UseFirefox_RemoteOptions()
Call wd.InitializeRemoteDriver("http://192.168.50.1:4444/wd/hub")
Call wd.NavigateToUrl("http://www.google.com")
Similarly, it can be coded for other remote drivers like Safari, Android, iOS, etc.
The post Webdriver | Selenium Grid | Remote Driver appeared first on TestMate.
]]>