I am struggling with a problem with my web-application, where a page is actually loaded but some async calls is blocking the UI randomly for a unpredictable amount of time. I now try to loop in this situation and want to click on a button until it gets available, but the it seems the way i check if the click was successful does not work and so the loops just loops until the end.
Here is the loop section in the c# script.
var index = 10 while (index > 0) { WebUI.delay(2) result = WebUI.click(findTestObject('Object Repository/Page_X/button_Neue Rufnummer'), FailureHandling.CONTINUE_ON_FAILURE) if (result) { index = 0 WebUI.delay(2) } else { index = (index - 1) } }The idea is to check if the click was successful (result == true), set index to 0 and expect the loop to finish. but it keeps stepping trough 10..9..8.. until 0. At an average the successful click happens around the 3rd/4th iteration of the loop.
Using Ranorex 9.1 and rather new to using it.
any help appreciated.