Forum Discussion

kzharkov's avatar
kzharkov
New Contributor
15 years ago

WaitPage sometimes works incorrect

Sometimes we got an error like this:



Type   Message   Time   Link

The object does not exist.   11:01:59   

You are trying to call the "Click" method or property of the "item" object that does not exist.



The place where the error raised is very usual (I've marked it with italic bold font):



  var page = ie.WaitPage(s_URL + "*", 10000);

  if(page.Exists) test2(page);



function test2(page) {

  var qSearch = page.NativeWebObject.Find("outerHTML", "*CspSearchComponent1_SearchTextBox*", "INPUT");

  qSearch.Click();

}



What we do wrong?

1 Reply

  • Hi,



    Actually, this problem has nothing to do with WaitPage. First of all, make sure that you use the correct property value and that the object tree is up-to-date. I recommend calling Page.Wait before working with the page's objects and calling Page.Refresh before Find.