Changes

Jump to: navigation, search

B2G/QA/Automation/Style Guide/Howtos

539 bytes added, 00:06, 5 November 2015
Returning the page object after completing an action
== Handling browser instances ==
TBD - mwargers
== Returning the page object after completing an action <njpark>==TBD - njparkWhen writing methods that is doing some invoking a certain UI action on causes the devicephone to open a new page, for instance opening an app or opening it is recommended to return the appropriate page object. <br />On a subpagerelated note, each page should have its own class definition, make sure where it lists methods that manipulates and checks the resulting action is finished and return associated UI elements.<br><source python> music_app.wait_for_music_tiles_displayed()  # tapping albums tab returns the list_view object of , # because it opens the resulting action, enew view list_view = music_app.gtap_albums_tab()  # tapping the first album returns the sublist_view object sublist_view = albums[0]. tap_first_album() # tapping the app or song opens the subpage player view player_view = sublist_view.tap_first_song(PageRegion # select stop player_view.tap_play()</source>
352
edits

Navigation menu