← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #166249]: Can we detect if webpage is loaded instead of using wait or exists?

 

Question #166249 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/166249

    Status: Open => Answered

RaiMan proposed the following answer:
--1.
Though it is generally possible ( find/click/exists("some-text") ) to search for text, it is currently not recommended (bugs and weak reliability)
In the given case I would use pictures.

--2.
The above snippet (comment #1) at least gives you some certainty, that the webpage in question is reachable and the browser is loading and rendering. wether a webpage is fully loaded can generally only be assured by looking wether everything is there, that should be there (same for Sikuli as for a user). So in the end, you have to look/wait for some images.
idea based on FF 5: in the upper left corner of a tab, there is some spinning wheel while the page is loading. When the page is fully loaded, it is replaced by the pages icon. You might watch this small area (guess 16x16 pixel) for the icon to come up.
These animations are available for other browsers too.

--3.
This generally means to have to implement some looping.
see faq 1437

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.