Selenium Grid Hub Node

Hi, after many hours spent to try i ask you.

but is it real the “remote” or fake the possibility to use a selenium grid hub with katalon?

i have used my machine for hub and node

HUB
192.168.15.13:4444/wd/hub
java -jar C:\Users\myuser\Desktop\Katalon_Studio_Windows\configuration\resources\lib\selenium-server-standalone-3.7.1.jar -role hub

geko node
192.168.15.13:5566
**java -Dwebdriver.gecko.driver=“C:\Users\myuser\Desktop\Katalon_Studio_Windows\configuration\resources\drivers\geckodriver.exe” -jar C:\Users****myuser\Desktop\Katalon_Studio_Windows\configuration\resources\lib\selenium-server-standalone-3.7.1.jar -role webdriver -hub http://192.168.15.13:4444/grid/register -port 5566

**
node and hub **are on.

but now???


**
but any time that i call “run remote”, all test fail, but if i use my “run” in firefox all work fine

where is my error or it’s a limit in katalon?

kt1.png

this is error in test case (i have also tried with chromedriver)

03-20-2018 03:54:05 PM - [FAILED] - Unable to open browser with url: ‘’ (Root cause: org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘LAP-PC-122’, ip: ‘172.20.193.33’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_161’
Driver info: driver.version: unknown
Command duration or timeout: 263 milliseconds)

this is is TEST CASE

`import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory
import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable

WebUI.openBrowser(’’)
WebUI.maximizeWindow()
WebUI.navigateToUrl(“http://google.com”)`

2 Likes

I have the same problem

Go to this “Tips and Tricks” discussion for specific information about the Katalon Studio & Selenium Grid integration…

Hi luca,

1. I was able to successfully run tests over a Selenium Grid using Katalon 5.3.1.

2. The error _Driver info: driver.version: unknown_means that Selenium can’t find chromedriver.

3. Could you try adding chromedriver.exe to your PATH instead of specifying it when initializing a node?

Luca,

I don’t believe your geckodriver.exe file is located where you described it in your Selenium Node command. There is another folder in between …\drivers and geckodriver.exe called “firefox_win64”…

Try this one (substitute myuser for your user name) that adds both a Chrome driver and a Firefox driver…

**java -Dwebdriver.gecko.driver=“C:\Users\myuser\Desktop\Katalon_Studio_Windows\configuration\resources\drivers\firefox_win64\geckodriver.exe” -Dwebdriver.chrome.driver="C:\Users\myuser\Desktop\Katalon_Studio_Windows\configuration\resources\drivers\chromedriver_win32\chromedriver.exe"
-jar C:\Users**myuser\Desktop\Katalon_Studio_Windows\configuration\resources\lib\selenium-server-standalone-3.7.1.jar -role webdriver -hub http://192.168.15.13:4444/grid/register -port 5566

Hi Folks, Hope this information helps.

After lot of struggle, finally resolved the issue. Below are the details

Hub Machine Configurations:

  1. Place selenium-server-standalone-3.0.1.jar file under katalon.exe file location.

2. Open command prompt from the same location and execute hub command
Command: java -jar selenium-server-standalone-3.0.1.jar -role hub

Node Machine Configurations:

1. Place selenium-server-standalone-3.0.1.jar and chromedriver.exe files under C drive any folder(i.e. C:\SeleniumGrid) location

2. Open command prompt from the same location and execute below command

Command: java -Dwebdriver.chrome.driver=C:\SeleniumGrid/chromedriver.exe -jar selenium-server-standalone-3.0.1.jar -role node -hub http://hubmachineipaddress:4444/grid/register

Note: Please provide your hub machine ip address

Hub Machine Configurations and Script run:

1. Open any browser and access console url(http://localhost:4444/grid/console) for seeing node register

2. Katalon Studio Script

Code:

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint

import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase

import static com.kms.katalon.core.testdata.TestDataFactory.findTestData

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint

import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory

import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords

import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile

import com.kms.katalon.core.model.FailureHandling as FailureHandling

import com.kms.katalon.core.testcase.TestCase as TestCase

import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory

import com.kms.katalon.core.testdata.TestData as TestData

import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory

import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository

import com.kms.katalon.core.testobject.TestObject as TestObject

import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords

import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import internal.GlobalVariable as GlobalVariable

import org.openqa.selenium.Platform;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.remote.DesiredCapabilities;

import org.openqa.selenium.remote.RemoteWebDriver;

WebDriver driver = new RemoteWebDriver(new java.net.URL(“http://localhost:4444/wd/hub”), DesiredCapabilities.chrome());

driver.get(“http://www.google.com”);

Note: Please don’t give node machine ip address in the above URL, because, that didn’t work for me

3. Remote settings on katalon studio:

Navigation: Menu, Project --> Settings --> Execution --> Default --> Web UI --> Remote, Provide below details

Remote web server url : http://nodemachineipaddress:5555/wd/hub (It’s example data: 10.19.33.125 is the node machine ip address, 5555 is the hub registered node)

Remote web server type : Selenium

os : windows

Browser : Chrome

Click Apply and OK

  1. Click Run and select “Remote” option

Output:

You can see the execution on remote machine(i.e. node machine)

Hi All
Everything works for me but the test execution is in headless mode by default, it is not launching the firefox.

Hello,

Has anyone been able to select in which specific node to run tests?