https://bugzilla.wikimedia.org/show_bug.cgi?id=71635

--- Comment #2 from Dan Duvall <dduv...@wikimedia.org> ---
(In reply to spage from comment #1)
> (In reply to spage from comment #0)
> > Is using 
> >   on(APIPage).client.log_in(ENV["MEDIAWIKI_USER"], 
> > ENV["MEDIAWIKI_PASSWORD"])
> > another alternative?
> 
> This doesn't work.  The mediawiki_api module issues its own HTTP requests
> from Ruby. So the cookies it gets back aren't set in the browser under test,
> it only uses them in subsequent API calls. You'd have to tell the browser to
> make the API POST, or "push" the cookies from the API response into the
> WebDriver session.

Passing the cookies over from an API call is an interesting idea, assuming API
sessions work in the same way interactive ones do. Of course, this should only
be using in setup context (i.e. `Given`) but it would greatly reduce the
overhead and fragility of tests that assume a logged-in state.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to