Button control is invalid
Posted: Wed Aug 17, 2016 3:26 pm
Hi All,
I am running a stress test that executes multiple steps 500 times/cycles.
One of the steps is to click a button control.
The test runs as expected for approximately 300-400 cycles then fails because the button control becomes invalid. The button control is visible on the screen but the ranorex report states that it is invalid.
The code is follows:
public static void selectBack()
{
UpperNavBarRepo.Instance.UpperNavBarButtonVar = "Back";
UpperNavBarRepo.Instance.HostServiceProvider.UpperNavBarButton.Click();
Delay.Seconds(2);
Report.Info("Back clicked");
}
Why does the button control suddenly become invalid?
What can cause a control to become invalid?
Is there anything I can do to make the control valid again?
Regards,
PC
I am running a stress test that executes multiple steps 500 times/cycles.
One of the steps is to click a button control.
The test runs as expected for approximately 300-400 cycles then fails because the button control becomes invalid. The button control is visible on the screen but the ranorex report states that it is invalid.
The code is follows:
public static void selectBack()
{
UpperNavBarRepo.Instance.UpperNavBarButtonVar = "Back";
UpperNavBarRepo.Instance.HostServiceProvider.UpperNavBarButton.Click();
Delay.Seconds(2);
Report.Info("Back clicked");
}
Why does the button control suddenly become invalid?
What can cause a control to become invalid?
Is there anything I can do to make the control valid again?
Regards,
PC