Find the element associated to the text provided and return selector of element to output variable

Hello, all help is appreciated!

I used the screen scrape tool to extract all text from a dynamic web page. I then check if the text “PK” exists in the text. If it does, I want to find the element associated with that text and return the selector of that element to an output variable?

How can this be done?

I’ve used find text position, find element, but the selectors change.

Thanks a lot!

Hi @DreamHEro

Please try using Anchor base activity,

Anchor Base - Identifies the target field and writes the sample text:

  • Left side - The Find Element activity identifies the PK field.
  • Right side - The Get Attribute activity to get the selector for PK field.

Thanks
Latika

Thank you @Latika10011740 !

I tried it, but received an error:
Anchor Base: Value does not fall within the expected range.

Question:
Because the attribute I’m looking for is dynamic, I unchecked that attribute in the selector for “Find Element.” So, in “Get Attribute” Activity could I still use that same attribute I unchecked in Find Element? Hope that makes sense.

I want to get the attribute value of a specific element, that changes every time the web page is refreshed.

Hi did u want to get the attribute of RK word or any word associated with that