Closed
Bug 867220
Opened 12 years ago
Closed 12 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•12 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•12 years ago
|
||
Or perhaps it's specific to the browser app in Gaia...
Assignee | ||
Comment 4•12 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•12 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•12 years ago
|
||
What is active process? Is that per iframe (in layman's terms)?
Assignee | ||
Comment 7•12 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•12 years ago
|
||
Attachment #743857 -
Flags: review?(mdas)
Assignee | ||
Comment 9•12 years ago
|
||
Comment 10•12 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•12 years ago
|
||
Good catch, updated.
Assignee | ||
Updated•12 years ago
|
Attachment #743857 -
Attachment is obsolete: true
Assignee | ||
Comment 12•12 years ago
|
||
Comment on attachment 743887 [details] [diff] [review]
Make setSearchTimeout behave globally,
carry r+ forward
Attachment #743887 -
Flags: review+
Assignee | ||
Comment 13•12 years ago
|
||
Target Milestone: --- → mozilla23
Comment 14•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 16•12 years ago
|
||
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•12 years ago
|
||
Updated•3 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•