Closed Bug 855029 Opened 11 years ago Closed 11 years ago

[B2G] Marionette frame out of sync after execute_script

Categories

(Remote Protocol :: Marionette, defect)

Other
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: zcampbell, Unassigned)

References

Details

In this test case after performing execute_script Marionette fails to find elements.

The is_wifi_connected does not switch to the top level frame so I don't see any reason why marionette would not be able to find elements anymore.

Not sure if get_active_element() is representative of the frame marionette is attached to but the active element is still the ftu frame.

Testing with 0.5.22 against v1-train.

Test Case
---------

    def test_issue_577(self):
        app = self.apps.launch("FTU")

        print self.marionette.get_active_element().tag_name
        # This will pass
        print self.marionette.find_element('id', 'forward')

        print self.data_layer.is_wifi_connected(self.testvars['wifi'])

        print self.marionette.get_active_element().tag_name
        print self.marionette.get_active_element().get_attribute('src')

        # This will fail
        print self.marionette.find_element('id', 'forward')

        # Can be recovered with:
        self.marionette.switch_to_frame(app.frame)
This is because .is_wifi_connected() calls switch_to_frame():

https://github.com/mozilla/gaia-ui-tests/blob/master/gaiatest/gaia_test.py#L230
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Apologies - I don't know how I came to think it doesn't switch to the top frame.
Status: RESOLVED → VERIFIED
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.