Hi,
I have encountered an issue with the methode url = WebUI.getURL()
.
If I want to get the url www.domain.com/diagnostics/value1?q=12345
,
I get the String: www.domain.com/diagnostics
.
Otherweise If I want to get the url www.domain.com/diagnostics/value2/12345
,
I get the correct String: www.domain.com/diagnostics/value2/12345
as expected.
Is there any issue with the question mark and/or the
equal sign in the url? Can anyone reproduce it?
I’m using Katalon Studio 5.1.0, Build 1 on Windows 7
Thanks a lot!
Stefan,
I have tried to re-produce the case with following script:
KeywordLogger log = new KeywordLogger();
WebDriver driver = DriverFactory.getWebDriver();
driver.get(“http://www.domain.com/diagnostics/value1?q=12345”);
log.logInfo(WebUI.getUrl());
log.logInfo(driver.getCurrentUrl())
I wrote to log file the URL getting by both Katalon Studio buit-in keyword and using Selenium Lib directly. Both of them return the same URL:
Could you double check on the case?
image.png
Okay, I figured it out! I let the test skript run in loops over night and some test cases passed.
I guess there is some asynchronous issue between the website (changing url) and my testskript (checking url) With some waiting time, everything works as expected.
Tanks a lot, Trong!
/close