Is it possible to read value for property 'Retry count'?

Best practices, code snippets for common functionality, examples, and guidelines.
span
Posts: 2
Joined: Thu Nov 25, 2021 2:43 pm

Is it possible to read value for property 'Retry count'?

Post by span » Thu Nov 25, 2021 4:36 pm

Hi everyone,

I want to read the value for property 'Retry count' and assign it to a variable in my user code.
This should be very straightforward, although I haven't found any information on how to access this property. Is it even possible, or am I missing something?
Attachments
Screenshot 2021-11-25 142158.png
Screenshot 2021-11-25 142158.png (29.8 KiB) Viewed 104 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7062
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Is it possible to read value for property 'Retry count'?

Post by odklizec » Fri Nov 26, 2021 8:17 am

Hi,

This code should help:

Code: Select all

int retryCountValue = ((TestCaseNode)TestSuite.CurrentTestContainer).RunRetryCount; 
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration