Closed
Bug 867220
Opened 11 years ago
Closed 11 years ago
[B2G] Implicit wait on find_element does not work
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(firefox21 wontfix, firefox22 wontfix, firefox23 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 fixed)
RESOLVED
FIXED
mozilla23
People
(Reporter: zcampbell, Assigned: jgriffin)
References
Details
Attachments
(2 files, 1 obsolete file)
1.41 KB,
text/plain
|
Details | |
10.64 KB,
patch
|
jgriffin
:
review+
|
Details | Diff | Splinter Review |
With these two test cases I demonstrate that the Implicit wait does not work in Marionette. The test page adds an element to the page after setTimeout/5000ms. The first test will try to find the element immediately and it will fail with a NoSuchElementException. The second test includes a hardcoded sleep(6) Set_search_timeout is set to 10000 in the setUp of both tests. As you can see this is conclusive proof that there was not a second shooter on the grassy knoll.
Comment 2•11 years ago
|
||
The following reduced test case works for me. This might imply it's a gaiatest issue rather than Marionette: from marionette import Marionette m = Marionette() m.start_session() m.set_search_timeout(10000) m.navigate('http://zacc.github.io/impltest.html') m.find_element('id', 'clickme').click() m.find_element('id','find').is_displayed()
Comment 3•11 years ago
|
||
Or perhaps it's specific to the browser app in Gaia...
Assignee | ||
Comment 4•11 years ago
|
||
This occurs because the current implementation of set_search_timeout delivers the timeout to the active process, and this test switches processes. We need to make set_search_timeout behave globally.
Comment 5•11 years ago
|
||
Yeah, I can confirm that adding self.marionette.set_search_timeout(10000) after switching to the browser app's content makes the test pass.
Reporter | ||
Comment 6•11 years ago
|
||
What is active process? Is that per iframe (in layman's terms)?
Assignee | ||
Comment 7•11 years ago
|
||
(In reply to Zac C (:zac) from comment #6) > What is active process? Is that per iframe (in layman's terms)? Generally, yes.
Assignee | ||
Comment 8•11 years ago
|
||
Attachment #743857 -
Flags: review?(mdas)
Assignee | ||
Comment 9•11 years ago
|
||
try: https://tbpl.mozilla.org/?tree=Try&rev=98bf9d1cd9e5
Comment 10•11 years ago
|
||
Comment on attachment 743857 [details] [diff] [review] Make setSearchTimeout behave globally, Review of attachment 743857 [details] [diff] [review]: ----------------------------------------------------------------- 1 potential issue. The rest looks good ::: testing/marionette/marionette-elements.js @@ +290,4 @@ > } > return; > } else { > + if (searchTimeout == 0 || new Date().getTime() - startTime > searchTimeout) { We should catch if !searchTimeout since we set it to null by default in this patch
Attachment #743857 -
Flags: review?(mdas) → review+
Assignee | ||
Comment 11•11 years ago
|
||
Good catch, updated.
Assignee | ||
Updated•11 years ago
|
Attachment #743857 -
Attachment is obsolete: true
Assignee | ||
Comment 12•11 years ago
|
||
Comment on attachment 743887 [details] [diff] [review] Make setSearchTimeout behave globally, carry r+ forward
Attachment #743887 -
Flags: review+
Assignee | ||
Comment 13•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/95993aae5d96
Target Milestone: --- → mozilla23
Comment 14•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/95993aae5d96
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 16•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18/rev/c161ceec6480
status-b2g18:
--- → fixed
status-b2g18-v1.0.0:
--- → wontfix
status-b2g18-v1.0.1:
--- → wontfix
status-firefox21:
--- → wontfix
status-firefox22:
--- → wontfix
status-firefox23:
--- → fixed
Keywords: checkin-needed
Assignee | ||
Comment 17•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/1cafe915804f
Updated•1 year ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•