question

phil avatar image
phil asked phil posted

web general question

what is the best way to see if a web page is up.  I am talking to many web devices and some  have an old IP address and but i dont know that until i try to open the page. 

Right now I wait for timeout (I reduced the timeout period to 15 secs)  But I am looking at 100's of devices and dont want to wait that much time.  I can ping the device and i thought of doing that before opening web page.

is there a better way?

thanks

iTestGUI Testing(Web-Java Swing-etc)
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
phil avatar image
phil answered phil posted

additional info:

sometimes you can ping the device but the web page does not responsed. Also had to increase timeout to 30 secs seems that some devices are slower than others.  

 

Question: Does not seem like a get an error on a failed web page.  Is there a way to enable telling me the page failed? 

1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

PreetS avatar image PreetS commented ·

There are a couple of things you can do here, based on your scenario. 

 

1) You can look for some specific content of the page that is guaranteed to be there

2) If your server is sending an HTTP error code, like 404 then you can listen to OnWebHTTPError event and fail your test case accordingly

 

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.