Measure the time it takes for a button to become enabled
Can someone instruct me how I would measure the time it takes for a button to become enabled on the screen. Should I use aqPerformance.Start() or will it be better to use aqDateTime.Now() as a stopwatch when the option is selected and then get the time again once the button is enabled.
If you can provide a sample it would be helpful to understand, I read the usage of the methods but not too clear where I can place it in a script. There are areas where I place the wait/pause method to slow down the script but will that affect the time the button from disable to enable state, and how will I present the time in the log file.
Use Case scanario
1) User select an image
2) Right-click on the image - a menu appears
3) Select the option to enable "MA" - a dialog appears showing a disabled button.
4) User waits (approx 30 seconds) until the button becomes enabled. - the current dialog shows the button enabled.
5) If the button takes longer than 30 seconds - the test case fails because it took longer than the requirement.
//Right Click on image
Aliases.browser.pageImagenet.vgSvgslice0.ClickR(347, 138);
//Click the option to turn on the button
Aliases.browser.pageImagenet.textnodeProcessingmovingaverage.Click(25, 13);
//Runs a script routine to pause until the button is enabled.
WaitForButton();
//Checks whether the 'contentText' property of the NameMapping.Sys.browser.pageExam.panelResult.panel object equals 'ON'
aqObject.CheckProperty(NameMapping.Sys.browser.pageExam.panelResult.panel, "contentText", cmpEqual, "MA\nClose\nON\n0");
//Run the next keyword test.
Thank you for your support.