Closed
Bug 757078
Opened 13 years ago
Closed 11 years ago
marionette navigates wrong tab if no delay between constructor and start_session() is given, windows XP
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: andrzej.j.skalski, Unassigned)
References
Details
Hi,
I use Marionette with MozRunner and MozProfile.
If I run only Marionette('localhost', self.marionette_port), two tabs appear:
#1 Firefox Nightly First run page
#2 Nightly start page
as I haven't changed default settings via MozProfile, and each profile is 'clean', except Marionette-enabling settings.
now, the next marionette call I do is of course
start_session()
which causes tab #3 to appear, for some reason between #1 and #2, instead of after them, but that's not an issue.
third call is of course
navigate(url), let's say url = 'http://www.firefox.pl'
and depending on moment start_session() took place, I get different results:
case 1)
if start session was called immediately after Marionette constructor, the url is loaded, but on the tab #1 instead of tab #3. Tab #3 remains empty, and is the one that is displayed (you can see url loading on the tab #1 in background, the icon and title is changing etc)
case 2)
if a sleep(5) is placed between constructor and start_session(), url is loaded on tab #3 as expected, tabs #1 and #2 remains are not modified in any way.
Note, that there is a delay between I start Nightly via FirefoxRunner and start Marionette, since in between I do some other stuff (loop for HWND, do some system calls to grab IAccessible object etc). Also, wait_for_port as described in https://bugzilla.mozilla.org/show_bug.cgi?id=753273 is called just for sure, but I guess that now it does not iterate even once, since HWND seems to appear later than port opens.
Reporter | ||
Comment 1•13 years ago
|
||
btw, I run MozProfile and Firefox Runner this way, in separate thread:
self.profile = FirefoxProfile()
self.profile.set_preferences({"marionette.defaultPrefs.enabled" : True,
"marionette.defaultPrefs.port": 2828
})
self.runner = FirefoxRunner(profile = self.profile,
binary = self.binary,
kp_kwargs = {'processOutputLine' : [self.logger]})
self.runner.start()
Updated•13 years ago
|
Component: Mozbase → Marionette
QA Contact: mozbase → marionette
Reporter | ||
Comment 2•13 years ago
|
||
adding additional preferences:
self.profile.set_preferences({"marionette.defaultPrefs.enabled" : True,
"marionette.defaultPrefs.port": 2828,
"browser.startup.page": 0,
"browser.startup.homepage": "about:blank",
})
makes tab #2 go away, but other than that bug is the same: marionette navigates on tab #1 (Nightly First Run Page) instead of #3 (created by start_session) if no sleep(5) is given between constructor and start_session.
Reporter | ||
Comment 3•13 years ago
|
||
btw, what is a profile setting to make "Nightly First Run Page" go away?
Comment 4•13 years ago
|
||
This is likely because we're not waiting after calling addTab; we need to set up an onload handler for this.
Comment 5•11 years ago
|
||
This has been fixed sometime in the past.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
Updated•2 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•