Changes

Jump to: navigation, search

B2G/QA/Automation/Style Guide/Howtos

1,196 bytes added, 19:31, 6 November 2015
Switching frames and system frame: content added
== Switching frames and system frame ==
TBD A frame is basically the context where marionette operates on. If marionette is on a frame that does not contain currently displayed UI elements, marionette will not find those UI elements, even if the user can see them on the phone at the time of the test.<br><br>[http://marionette- mwargersclient.readthedocs.org/en/latest/reference.html?highlight=switch_to_frame#marionette_driver.marionette.Marionette.switch_to_frame switch_to_frame()] command lets you change the frame, and you may need to do this when you need to manipulate system dialog or browser window instance.<source python># switch to the system frameself.marionette.switch_to_frame()# look for camera frame on the system framesecure_camera_frame = self.marionette.find_element(*self._secure_camera_frame_locator)# switch to the found camera frameself.marionette.switch_to_frame(secure_camera_frame)self.wait_for_capture_ready()</source>gaia_test.py has a helper app to switch to the displayed app, switch_to_displayed_app(). <source python>def switch_to_settings_app(self): # wait until settings app is displayed self.wait_to_be_displayed() # now switch to the settings app self.apps.switch_to_displayed_app()</source> 
== Handling browser instances ==
TBD - mwargers
352
edits

Navigation menu