Does anyone know how, I make the below code more resilient?
What I am trying to do is verify items on my menu. After clicking on menu items I do a check point...everything works well as long as the right thing happens. I want to give a warning and continue when the expected HTML element does not appear.
If the menu is a dropdown, you could use the listbox entry for it. It would however depend on the type of dropdown you are looking at. You could also use a WaitForExist(Time in MS.) this would wait a given amount of time then continue on after it has timed out. Something like:
<font class="small">Code:</font><hr /><pre>
Ab = Window("Region4").HTMLElement("HTMLElement").WaitF orExists(20000)
If Ab = "False" Then
Blah Blah Blah
Window("Region4").HTMLElement("HTMLElement").LMous eDown(82, 349, 125)
Window("Region4").HTMLElement("HTMLElement").LMous eUp(82, 349, 157)
End If</pre><hr />
Success is the ability to go from one failure to another with no loss of enthusiasm.
~ Winston Churchill ~