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

Best practices, code snippets for common functionality, examples, and guidelines.
span
Posts: 3
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?
You do not have the required permissions to view the files attached to this post.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
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

span
Posts: 3
Joined: Thu Nov 25, 2021 2:43 pm

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

Post by span » Fri Dec 10, 2021 10:48 am

Yes, that worked! Thank you!