Deep Note :
I know I can use the following code but I don’t want to create a new driver or check if this driver started as remote or local, I want to set DesiredCapabilities for the remote driver directly with this parameter.
Welcome to our community. Thank you for raising your concern.
Actually, can you please help explain more what you want, what feature request you expect looks like, what the impacts, …? Thanks to those, we can better investigate it.
Thank you for your return.
I am taking my caseName on test case before test listener and throwing it into globalvariable.
After the test
Project Settings > Desired Capabilities > Do this in Remote
moon:options` {name : {$Globalvariable.testCaseName}} and I want to run the test with this name on Moon.
First of all, you can follow the errors I got here and the code parts I added from the post.
When I look for a solution, I see that I need to create a remote driver again and send capability parameters, which increases the fragility of the project and I often get errors in the runs. Is it possible to send this parameter more efficiently to the driver selected for the run?
It’s been a while since we saw you on the forum. And, looking at your thread, we believe you could gain more visibility for your feature request by sharing it via our new ideaExchange portal.
You can learn more about ideaExchange in the thread below:
@rdcybaspinar you do not need to build a RemoteWebDriver yourself, and the ${GlobalVariable} syntax is not expanded in the desired capabilities screen, that is why moon got the literal string. the supported way is to set the capability at runtime before the browser opens, the api is RunConfiguration.setDriverPreferencesProperty and it has a ‘Remote’ bucket (katalon docs, “pass desired capabilities at runtime”, section for remote execution). it overrides whatever is in project settings and katalon still creates the remote driver for you.
the value can be a map, it is serialized as a json object in the session request, so moon receives moon:options as a nested object. leave browserName and the remote url in project settings as they are now. only catch: it has to run before WebUI.openBrowser, so in a suite where you open the browser once in the first test case the name is fixed for that session, you would need one session per test case to see one moon run per test.