Last active
December 17, 2015 09:29
-
-
Save edwindotcom/5587239 to your computer and use it in GitHub Desktop.
quick dirty launch UI tests
This file contains 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
from gaiatest import GaiaTestCase | |
import time | |
class TestIdentitySmoke(GaiaTestCase): | |
APP_NAME = 'UI tests' | |
_bid_tests_locator = ('link text', 'navigator.mozId tests') | |
_bid_iframe_locator = ('css selector', 'iframe[src*="identity"]') | |
def setUp(self): | |
GaiaTestCase.setUp(self) | |
self.apps.launch('ui tests') | |
# print 'self.page_source', self.marionette.page_source | |
def test_request(self): | |
self.wait_for_element_displayed('link text', 'navigator.mozId tests') | |
bid_btn = self.marionette.find_element(*self._bid_tests_locator) | |
bid_btn.tap() | |
self.wait_for_element_present(*self._bid_iframe_locator) | |
bid_frame = self.marionette.find_element(*self._bid_iframe_locator) | |
self.marionette.switch_to_frame(bid_frame) | |
print 'DUMP', self.marionette.page_source.encode('utf-8') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment