The default bug view has changed. See this FAQ.

Implement page loading strategies

NEW
Unassigned

Status

Testing
Marionette
P3
normal
3 years ago
10 days ago

People

(Reporter: mdas, Unassigned)

Tracking

(Blocks: 1 bug, {ateam-marionette-client, ateam-marionette-server, ateam-marionette-spec})

Trunk
ateam-marionette-client, ateam-marionette-server, ateam-marionette-spec
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [marionette=1.0], URL)

We currently implement what is closest to 'normal' page loading in WebDriver, but we should allow the user to decide what strategy they want to use for page loading: https://dvcs.w3.org/hg/webdriver/raw-file/tip/webdriver-spec.html#page-load-strategies-1

This spec mentions that we may select the strategy when we request a newSession, but I think that having a call like 'setPageLoadStrategy' would be useful if you want to explicitly set the strategy in the middle of a test. A use case for this would be where my test harness gives me a session that enforces 'normal' strategy, but I want to test the behaviour of a page as soon as its readyState is 'interactive', so instead of deleting and creating a new session, I can just dynamically change the strategy. Dburns, what do you think? Has this been discussed before?
Flags: needinfo?(dburns)
Blocks: 721859
For B2G, we need the ability to test pages that are in an "interactive" state. Specifically when apps or the browser displays an about:neterror page, we want the ability to test functionality on that page. For this use case, it would be extremely useful to be able to set the page loading strategy on the fly, so that we don't have to create a new session each time we want to navigate to our error page.

Based on Malini's comment here: https://bugzilla.mozilla.org/show_bug.cgi?id=936301#c3
Duplicate of this bug: 936301
(In reply to Malini Das [:mdas] from comment #0)
> We currently implement what is closest to 'normal' page loading in
> WebDriver, but we should allow the user to decide what strategy they want to
> use for page loading:
> https://dvcs.w3.org/hg/webdriver/raw-file/tip/webdriver-spec.html#page-load-
> strategies-1
> 
> This spec mentions that we may select the strategy when we request a
> newSession, but I think that having a call like 'setPageLoadStrategy' would
> be useful if you want to explicitly set the strategy in the middle of a
> test. A use case for this would be where my test harness gives me a session
> that enforces 'normal' strategy, but I want to test the behaviour of a page
> as soon as its readyState is 'interactive', so instead of deleting and
> creating a new session, I can just dynamically change the strategy. Dburns,
> what do you think? Has this been discussed before?


This hasnt been discussed before but at the moment I don't really understand the use case for changing this strategy mid-test. 

For context, the main reason this was added in the first place was due to CDNs taking the longest to reply to requests (ironic isnt it). As you know, I am wary of adding anything API that can have a knock on effect (or allows people not to write deterministic tests), especially around navigation for later tests and think the advice given in https://bugzilla.mozilla.org/show_bug.cgi?id=936301#c3 is sound. 

I would be all for adding special cases for about:* pages so we don't get stuck in the interactive state for "special" pages.
Flags: needinfo?(dburns)
(In reply to David Burns :automatedtester from comment #3)
> (In reply to Malini Das [:mdas] from comment #0)
> I would be all for adding special cases for about:* pages so we don't get
> stuck in the interactive state for "special" pages.

I think that works in this case, what do you think mhenretty?
(In reply to Malini Das [:mdas] from comment #4)
> (In reply to David Burns :automatedtester from comment #3)
> > (In reply to Malini Das [:mdas] from comment #0)
> > I would be all for adding special cases for about:* pages so we don't get
> > stuck in the interactive state for "special" pages.
> 
> I think that works in this case, what do you think mhenretty?

That would be great. Thank you!
(In reply to Michael Henretty [:mhenretty] from comment #5)
> (In reply to Malini Das [:mdas] from comment #4)
> > (In reply to David Burns :automatedtester from comment #3)
> > > (In reply to Malini Das [:mdas] from comment #0)
> > > I would be all for adding special cases for about:* pages so we don't get
> > > stuck in the interactive state for "special" pages.
> > 
> > I think that works in this case, what do you think mhenretty?
> 
> That would be great. Thank you!

Okay, you can track that work here https://bugzilla.mozilla.org/show_bug.cgi?id=940084.

I'm leaving this bug open since we need to implement page loading strategy selection at *new session* as per spec requirements.

Updated

3 years ago
Blocks: 882186
Whiteboard: [spec]
Keywords: ateam-marionette-spec
Whiteboard: [spec]
Keywords: ateam-marionette-client, ateam-marionette-server
Whiteboard: [marionette=1.0]
Summary: implement page loading strategies → Implement page loading strategies
Hardware: x86 → All
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.