Ask a Question

Can we do reload browser when an event of "Site can't be reached occur"

dikshika114
Contributor

Can we do reload browser when an event of "Site can't be reached occur"

Provide me a solution for:

1. How to create event for complete Project Suite - Event is - if "Site Can't be reached" displayed on page instead of object then reload the page.

2. How to reload a page?

Using JavaScript

dikshika114_0-1638457465811.png

 

4 REPLIES 4
ebarbera
Staff

Re: Can we do reload browser when an event of "Site can't be reached occur"

Hi @dikshika114 - 

 

To refresh the browser there are a few methods of the browser that can be used - https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/web/general/browsers...

 

For example the refresh method can be used to refresh the browser, the navigate method could also be used. 

 

Are you aware of how to use the event handlers? If not I can explain how to do that as well. 


Thanks, 
Emma

dikshika114
Contributor

Re: Can we do reload browser when an event of "Site can't be reached occur"

Hi @ebarbera 

1. Refresh Method is not working.

2. The issue is while execution on CBT, so, i don't think, navigate method would be a good idea.

3. I know how to use Events. But please tell me, Which exact event i can use which works anytime when this kind of page shows. So, please provide me the script or event name that i can use.

4. Also provide the script to see, if "Site can't be reached" is displayed.

 

Thanks

ebarbera
Staff

Re: Can we do reload browser when an event of "Site can't be reached occur"

Hi @dikshika114 -

 

Another clarifying question - do you only see this "site cannot be reached" error when running your test in CBT? If so it could be an issue concerning the site not being publicly available and you may need to make use of the tunnel.

 

https://support.smartbear.com/testcomplete/docs/app-testing/web/cross-platform/choose-your-web-app-l...

https://support.smartbear.com/crossbrowsertesting/docs/local-testing/index.html

 

Emma

dikshika114
Contributor

Re: Can we do reload browser when an event of "Site can't be reached occur"

 @ebarbera 1. Yes. I saw it while running it on CBT.

2. When I click on reload from Interactive View on CBT, It gets work.

3. And It's available publicly. because when we click on Sign in button after entering credentials, this issue is coming. Other than that every test case is running which executes before Sign in. So, it's not a local site

 

Thanks

Dikshika

cancel
Showing results for 
Search instead for 
Did you mean: