Cannot find element on web page using xpath and ID is generated in CSS at render time

I’m trying to identify an element on a web page and then click it (hyperlink), but at run time I’m getting an error with the xpath for the element. The element exists in a table. I tried the xpath from google chrome developer tools and the xpath identified during recording, neither worked. The element has an ID tag but that can only be obtained from the CSS at render time and Katalon cannot interact with CSS? I also added a WaitForPageToLoad before trying to search for that element.

How can I identify such an element?

You need to change the Xpath value to the following:

id("gridview-1018-record-ext-record-135″)/td[@class=“x-grid-cell x-grid-td x-grid-cell-headerId-wrkItms x-grid-cell-first x-unselectable”]/div[@class=“x-grid-cell-inner”]/b[1]/a[text()=‘2867024’]

Another thing is because the element is not fully rendered, so you can use ‘waitForElementPresent’ and use generated Xpath from Katalon Studio instead of using ‘waitForPageLoad’ is a better choice


I can’t access the ID at runtime since I don’t have access to the CSS, but the text on the element I’m looking for is 2867024.

Katalon generated the following xpath and I attempted to identify the element just by the xpath - id(“gridview-1018-record-ext-record-135”)/td[@class=“x-grid-cell x-grid-td x-grid-cell-headerId-wrkItms x-grid-cell-first x-unselectable”]/div[@class=“x-grid-cell-inner”]/b[1]/a[1]

A possibility is to write a xpath based on the tag and the text of the link. If you know the id at runtime you can also write a CustomKeyword for find all elements that match a less restrictive xpath and loop through them looking for the css value. I would need more information to help out with a xpath or keyword.

There’s also configurations on the Test Objects that define filters by css.