Objects not identified verifyElementPresent but xpath is correct, works on others machines

Hi all,

I just got Katalon on my work device and am trying to run some scripts from my company’s github repo. For some reason, objects don’t get recognized regardless of the browser even though the xpath are correct.

These tests work on all my colleagues computers so the issue is local to me. However, it’s weird because if I use the built-in ‘Click’ and give it the same xpath, it can click the object no problem. verifyElementPresent seems to not pick any of the objects up.

I’ve tried reinstalling katalon, different browsers (chrome/firefox), changing xpaths, the works.

Any ideas why its not working? I’m at my wits’ end.

Thanks

1 Like

You might be on a different “switch” on your network that is busier/faster than your other coworkers. What you can do as a test is to ensure the object is present on the page before you check if the object is present/visible. So,

 // insert a lot of these in your code when move to a new page
WebUI.waitForElementVisible(findTestObject('...'), 10) 
// and then you can go to town on your "static" objects
WebUI.verifyElementVisible(findTestObject('...'))

I guess that you now have such code:

WebUI.click(findTestObject("some/test/object"))   // success
WebUI.verifyElementPresent(findTestObject("some/test/object"))   // problem

Why not try changing it to :

WebUI.click(findTestObject("some/test/object"))   // success
WebUI.verifyElementPresent(findTestObject("some/test/object"), 10)   // should be ok

Please note that the verifyElementPresent keyword requires 2nd argument.

Show us the execution log, and your test case script. Then others would be able to find more.

1 Like