Selector Problem

Hi,

I am facing a problem to capture a screen when a I use this structure:

"xpath": "//a[@id=\"ext-gen1237\"]/em/span/span"

I´ve tried replace the information of @ID to @class in xpath as I did in another forum, but it didn´t work.

The postfix number in “ext-gen” in the ID is likely a dynamically generated one by JavaScript, causing the numbers in IDs (like ‘gen1237’) to change frequently with each page reload.

If you notice that the numbers in these IDs change often, it’s better to use a more stable selector. Or, consider a relative XPath that doesn’t rely on this ID completely, such as:

"//a[contains(@id, 'ext-gen')]/em/span/span"

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.