Simple way to append a baseurl

I have a test case that verifies a header is present on every page of a website. Right now, it navigates to each page individually and verifies, but I need to be able to run this test on multiple environments. I have profiles and baseurls set up as global variables, but I don’t know how to go from

WebUI.navigateToUrl(GlobalVariable.baseurl, FailureHandling.STOP_ON_FAILURE)

which opens, for example, to opening by somehow combining GlobalVariable.baseurl with /help. That way, I can have a different profile go to without having to make a separate test case because the baseurl is different.

I’ve read through a couple of topics that cover this with complex answers that I’m hoping are now outdated. Is there a straightforward way to do what I’m after?

Actually, the solution was right in front of me but I thought it was too simple to work!

If I add +"/help" it works the way I intended.

WebUI.navigateToUrl(GlobalVariable.baseurl + "/help", FailureHandling.STOP_ON_FAILURE)
1 Like