cancel
Showing results for 
Search instead for 
Did you mean: 

why my page wait method doesn't work?

SOLVED
whuang
Frequent Contributor

why my page wait method doesn't work?

Hi there,

 

I was using Aliases.browser.Page("*Admin/Alerts/AlertTemplateDetails.aspx*").Wait(30000) to ask TC wait for the page was loaded, but as you can see in the screenshot, it looks like TC could recognized the page and it logged an error after just around 4 seconds saying the page was not found. Did I code it wrong? Can anyone tell me how I can fix it?

 

Thanks in advance

untitled.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
AlexKaras
Community Hero

Re: why my page wait method doesn't work?

Hi,

 

There was only chrome running at that time.

Can you double-check this using the Details tab of Task Manager?

My expectation is that there is more than one browser process exists in the system and TestComplete picks up the one that is not visible and thus does not have Page which TestComplete tries to wait for and fails after timeout.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

8 REPLIES 8
ApplePen
Contributor

Re: why my page wait method doesn't work?

The wait method is correct. This method should apply in page object.

But I think the alert page is a window object not a page.

Please check the alert object in Object Browser.

Or use FindChild method instead by wait method.

whuang
Frequent Contributor

Re: why my page wait method doesn't work?

I checked the alert page in TC, and it is a page object as you can see in the screenshot below.

Capture.PNG

I also have another case waiting for the Office365 web mail page failed for the same error.

1.PNG

AlexKaras
Community Hero

Re: why my page wait method doesn't work?

Hi,

 

page was not found.

According to this error message you should figure-out why this page is not found by TestComplete. As soon as the page is recognized by TestComplete .Wait() method should work.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
whuang
Frequent Contributor

Re: why my page wait method doesn't work?

That was exactly my question, I am not sure why it was not recognized by TC.

AlexKaras
Community Hero

Re: why my page wait method doesn't work?

Hi,

 

If the problem is still actual...

 

 Aliases.browser.Page("*Admin/Alerts/AlertTemplateDetails.aspx*").Wait(30000)

Can you let us know:

a) how 'browser' alias is defined in your NameMapping; and

b) how many browsers (including those that are not visible on screen) are running in your system at the moment of test execution?

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
whuang
Frequent Contributor

Re: why my page wait method doesn't work?

Yes, the problem is still actual.

Any object type that is "Browser" is considered as 'browser' alias. There was only chrome running at that time.

AlexKaras
Community Hero

Re: why my page wait method doesn't work?

Hi,

 

There was only chrome running at that time.

Can you double-check this using the Details tab of Task Manager?

My expectation is that there is more than one browser process exists in the system and TestComplete picks up the one that is not visible and thus does not have Page which TestComplete tries to wait for and fails after timeout.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

sonya_m
Community Manager

Re: why my page wait method doesn't work?

Thanks everyone for replying to this thread!

 

@whuang Have you tried what Alex suggests here? Please let us know if it helped. 


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors