Web element not found using xpath on Linux instance

Hi,
The katalon test cases are running fine when I run locally either from studio or Command. But, when I run inside Amazon linux instance, it’s throwing errors related to XPath and unable to find the web element. I tried with absolute XPath and relative XPath, everything is falling on the Linux instance. Can someone help?

hi,

needed more info to understand what issue you have

@siri.korla Try this

WebUI.setViewPortSize(1360, 978)

Instead of

WebUI.maximizeWindow()

WebUI.maximizeWindow() will maximize the Window according to the screen resolution set for your linux server.


This is the html and how do I read with id=mat-input-1. I tried with absolute xpath and relative. Both didn’t work.
//*[@id=“mat-input-1”] or full xpath starting from /html/----/div[4] Didn’t work for me.

Like this I have many elements to read such as link, button, and tabs> None of them are working for me. They work fine when I run locally (using studio or command) by defining custom xpath

hi,

not sure but try with CSS Selector

@siri.korla for an ID, you can use the simple format: id(“mat-input-1”)

and they are parentheses, not square brackets.

if this does not work, since it works for you locally, you may have to put something in front of your xpath to link to the site where the web page is located.