Why TC keeps waiting until the time expire while I can see the object I am waiting for is there
Hi Guys,
I was trying to get TC to click on a link and then click on another link on the page after. So I used a WaitChild method in the script, but it keeps waiting on the page until the 30 seconds expired, but I can see the object that I was waiting for was showing on the page as soon as the first link was clicked. Same issue when I used the WaitProperty method instead of the WaitChild. Can anyone tell me what wait method I should use in order to avoid uneccessary waiting?
sys.Browser("*").Page("*").Find("contentText","Photo, Video & Design",30).Click
call Sys.Browser("*").Page("*").WaitChild(Sys.Browser("*").Page("*").Find("contentText","Corel",30),30000)
sys.Browser("*").Page("*").Find("contentText","Corel",30).Click
Thanks!
Hi,
Possible code (assuming that the initial page is already opened in the browser):
Dim page Dim oControl Set page = sys.Browser("*").Page("*<yourCompany>.com*") Set oControl = page.Find("contentText", "Photo, Video & Design", 30) If (oControl.Exists) Then Call oControl.Click() Else Call Log.Warning("Web element with the 'Photo, Video & Design' text was not found", , , , page.PagePicture) End If Call page.Wait() ' waits until new page is loaded Set oControl = page.Find("contentText", "Corel", 30) If (oControl.Exists) Then Call oControl.Click() Else Call Log.Warning("Web element with the 'Corel' text was not found", , , , page.PagePicture) End If Call page.Wait()