Created
July 17, 2013 15:50
-
-
Save bebef1987/6021840 to your computer and use it in GitHub Desktop.
frame
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NewContact(ContactForm): | |
_done_button_locator = ('id', 'save-button') | |
_new_contact_frame_locator = ('css selector', "iframe[src^='app://communications'][src$='contacts/index.html?new']") | |
def __init__(self, marionette,switch_to_frame = False): | |
ContactForm.__init__(self, marionette) | |
if switch_to_frame: | |
self.marionette.switch_to_frame() | |
self.wait_for_element_present(*self._new_contact_frame_locator) | |
frame = self.marionette.find_element(*self._new_contact_frame_locator) | |
self.marionette.switch_to_frame(frame) | |
self.wait_for_element_displayed(*self._done_button_locator) | |
def tap_done(self): | |
self.marionette.find_element(*self._done_button_locator).tap() | |
from gaiatest.apps.contacts.app import Contacts | |
return Contacts(self.marionette) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment