TestProject Forum

Capture dynamic number as Output and display in Report

Hi all,

I am trying to capture a dynamic element and getting a value in Output parameter. Please let me know how to get value from a dynamic element.

Thanks for your prompt reply.

Hello @sharpat8
You can use this article and see how to work with dynamic elements:
https://intercom.help/testprojectio/en/articles/3572418-how-to-create-dynamic-elements-in-testproject
If this does not help you, I would be happy if you give an example for how the element changes.

Thanks! I tried but did not get it. Please help me to understand if there is a way to use RegEx in Xpath or Csselector. I have fields that change with States. Example:
Text1 filed CSS selector #U1_4_Q with IL
the same field has CSS selector #U1_2_Q with CO-like-wise. I was wondering if I can give a regular expression like single-digit [0-9] in CSS selector so it can automatically recognize the value. I think the auto AI finder does a great job in finding these elements but it slows down the script. I thought I can add reg exp so that it can identify elements easily.

Thanks for the help.