April 24, 2023, 2:09pm
I need help, please…
I’m launching my test collection from a docker image inside Jenkins, and I’d like to use a remote browser instead of docker’s one. To do this, I tried with these lines on my config file :
But I get a
[TEST_CASE][FAILED] - Test Cases/xxx/xxx/xxx: FAILED.
com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: ''
Caused by: com.kms.katalon.core.exception.StepFailedException: No driver is set for execution.
If I launch my tests on Katalon Studio by using “Remote” as browser, tests pass like a charm…
So the question is : how can I connect to my selenium grid from a docker ?
Many thanks in advance (and sorry in advance too, cause I’m not a dev…)
April 25, 2023, 7:54am
well, not exactly. I am able to use remote browser from KS.
The idea is to use the same but inside a docker image launched on a Jenkins server…
April 25, 2023, 9:41am
@simon.klotz , sorry to bother you, but apparently you’ve been able to solve a similar problem here : How to run tests on remote chrome docker container - #2 by simon.klotz …
Could you help me understand how to run tests from docker on a remote browser ? Thanks.
Oh I just tried a similar scenario yesterday.
But with 2 docker containers running on my local machine and not on a jenkins.
(I want it to get triggered later via GitLab)
I was trying to run the KRE in one container and the remote browser in a second container.
So if I launch my tests on the first container and try to reach the remote browser inside a second container I need the IP address from the second container.
docker inspect <container_id> |grep IPAddress
Then setup the Remote server URL with the IP you got:
If the container will have a new IP in future, this is probably not a stable solution … but I’m also about to try this out at the moment.
Hope this is what you needed,
April 26, 2023, 12:20pm
@simon.klotz , I’m now able to launch tests from a docker mounted on jenkins to a remote browser.
Now the problem is : how do I get download files folder ?
For a standard browser I can get it with :
String userHome = System.getenv( 'userprofile' );
String downloadPath = userHome + File.separator + "Downloads"
But of course on selenium grid the System.getenv( ‘userprofile’ ) is null.
So now I’m a bit lost…
May 5, 2023, 8:52am
Solved by using a fixed path :