Difference in web url when running Katalon on Gitlab CICD pipeline

Hi all,

I am currently exploring the use of katalon-based testing for my team and the end goal would be to integrate it into new cicd pipelines on gitlab. When I try to run a test job, the logs on gitlab has this error for my testcase

2023-08-11 04:03:41.254 ERROR c.k.k.core.keyword.internal.KeywordMain - :x: Unable to navigate to ‘LetCode with Koushik’ (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to navigate to ‘LetCode with Koushik

On clicking this link to the test url, it navigates to LetCode with Koushik’ instead of LetCode with Koushik, with the extra single quotation mark and results in an error page. When running the testcase locally in Katalon Studio, this error does not occur. Would anyone know why this error is happening, and how I can fix this? Any ideas would be greatly appreciate

2 Likes

Hi,

I do not see the different in 2 links navigate to. They both are https://letcode.in/test

2 Likes

Hi @Elly_Tran thanks for taking a look,

When it executes on gitlab, the first link is appended with an extra quotation mark. https://letcode.in/test' whereas the one I had defined in my Katalon Studio is the proper one without the quotation mark https://letcode.in/test

I have no clue as to what can be causing the url to be appended with this extra quotation mark when running in gitlab vs locally on Katalon Studio. Thank you

2 Likes

Please have a look at the following guidance:

Hi @lewiesthor, Not sure why it’s happening but you could use replaceAll like this?

def URL = "https://letcode.in/test'"
URL = URL.replaceAll("\'", "") //remove all single quotes
println("finalURL: " + URL)
Output: finalURL: https://letcode.in/test