Skip to content

Instantly share code, notes, and snippets.

@edwindotcom
Last active December 17, 2015 09:29
Show Gist options
  • Save edwindotcom/5587239 to your computer and use it in GitHub Desktop.
Save edwindotcom/5587239 to your computer and use it in GitHub Desktop.
quick dirty launch UI tests
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