Retries After Initial Failure
Posted: Fri Apr 30, 2021 9:24 pm
In my test case, I am opening up a URL and it can either load correctly, or load a page with the title "Automation Error". I am looking at a <h3> tag to see if the Automation Error page is laded using the following in a code module:
If the error page is loaded, the test will fail and go to the next iteration.
Everything works as expected except it does 28 retries which takes 7 seconds. How can I tell it to stop after say 2 tries? I would like it to just fail and go to the next iteration. Here is the message that I get in the report:
Element for item 'All_DNIS_TST_OutcomeRepository.ApplicationUnderTest.Alert_Box_Components.Automation_Error_Page_Heading' does not exist (Failed to find item 'All_DNIS_TST_OutcomeRepository.ApplicationUnderTest.Alert_Box_Components.Automation_Error_Page_Heading'. Please check that your whitelist allows Ranorex to access the process. No element found for path '/dom[@domain='agentwebtest' or @domain='agentwebdev']//div[#'content']//h1[@innertext='Automation Error']' at step 'descendant-or-self::h1[@innertext='Automation Error']' after 28 attempts within 7s (timeout factor = 0.2).).
Thanks for your help!
EDIT: I have the Retry count set to 0 on the testcase - if that helps.
Code: Select all
if(Validate.NotExists(repo.ApplicationUnderTest.Alert_Box_Components.Automation_Error_Page_HeadingInfo,null,true));
Everything works as expected except it does 28 retries which takes 7 seconds. How can I tell it to stop after say 2 tries? I would like it to just fail and go to the next iteration. Here is the message that I get in the report:
Element for item 'All_DNIS_TST_OutcomeRepository.ApplicationUnderTest.Alert_Box_Components.Automation_Error_Page_Heading' does not exist (Failed to find item 'All_DNIS_TST_OutcomeRepository.ApplicationUnderTest.Alert_Box_Components.Automation_Error_Page_Heading'. Please check that your whitelist allows Ranorex to access the process. No element found for path '/dom[@domain='agentwebtest' or @domain='agentwebdev']//div[#'content']//h1[@innertext='Automation Error']' at step 'descendant-or-self::h1[@innertext='Automation Error']' after 28 attempts within 7s (timeout factor = 0.2).).
Thanks for your help!
EDIT: I have the Retry count set to 0 on the testcase - if that helps.