amohanta / spynner

Automatically exported from code.google.com/p/spynner
GNU General Public License v3.0
0 stars 0 forks source link

Load page waits (load, clicks, ...) #18

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Right now there is two ways to wait for a page load (or AJAX request), one
is setting args in load() / click() / ...,  and the other is calling
wait_load(). This is "working" but it's not correct, as the page could be
loaded *before* the wait function is actually called.

I have to give it a though, maybe functions like load(), click(),
click_ajax() should not return until the page load (or AJAX request) is
finished.

Original issue reported on code.google.com by tokland on 17 Aug 2009 at 10:19

GoogleCodeExporter commented 9 years ago
In your current SVN head, there's a typo:
    def click_link(self, selector, timeout=None):
        """Click a link and wait for page load."""
        return self.click(selector, wait_page=True, timeout=timeout)

wait_page should be wait_load.

Original comment by BaiHa...@gmail.com on 2 Jan 2010 at 4:15

GoogleCodeExporter commented 9 years ago
r133, thanks.

Original comment by tokland on 3 Jan 2010 at 6:35