Closed Bug 1093386 Opened 10 years ago Closed 10 years ago

Timing out in this case with slow loading site

Categories

(Remote Protocol :: Marionette, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: martijn.martijn, Unassigned)

References

Details

Attachments

(1 file)

See the attached patch that changes the tests/functional/homescreen/test_homescreen_launch_app.py test.

This installs the webapp defined at: http://moz.kantjils.nl/webapps/slow_webapp/manifest.webapp
For the content of that, see: http://moz.kantjils.nl/webapps/slow_webapp/manifest.webapp.txt

That points to http://moz.kantjils.nl/webapps/slow_webapp/delayed_load.php?seconds=30
For content of that file, see: http://moz.kantjils.nl/webapps/slow_webapp/delayed_load.php.txt

http://moz.kantjils.nl/webapps/slow_webapp/

It means that <p id=content> is available only after 30s. 

In test_homescreen_launch_app.py I have a wait_for_element call for that:
        email = self.wait_for_element_present(*self._content_locator)

When I run that test, on desktop b2g, it is waiting the 30 seconds just fine and the test passes.
On device, the test is failing. It's bailing out after 5 seconds or similar after the app has launched.

I don't think there should be a difference like that between desktop and device, should there?

Also, notice how the slow webapp displays a black screen for the most part, until the page has finally finished loading. That is probably a different bug, in the b2g system.
Blocks: 1086680
(In reply to Martijn Wargers [:mwargers] (QA) from comment #0)
> Also, notice how the slow webapp displays a black screen for the most part,
> until the page has finally finished loading. That is probably a different
> bug, in the b2g system.

I filed bug 1093671 for this.

I think I found a workaround for bug 1086680, btw.
this is not a marionette bug.

To set page load timeout to something else please use the `timeout` method on http://dxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/marionette.py#1080

you will need to do 

> self.timeouts(self.TIMEOUT_PAGE, 45000) #Set page load timeout to 45 seconds
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Ok, I guess that Marionette is not considering whether the page has finished loading or not.
(In reply to Martijn Wargers [:mwargers] (QA) from comment #3)
> Ok, I guess that Marionette is not considering whether the page has finished
> loading or not.

Marionette does consider if a page has loaded or not, `navigate()` will not return until the page has loaded or the timeout has reached. Unfortunately a page taking 30 seconds or more to load is really bad UX and should error. Imagine if we had to run 10 tests against this site, that's 5 minutes wasted for page load without you explicitly knowing about it.
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: