Skip to content

Instantly share code, notes, and snippets.

@edwindotcom
Last active December 17, 2015 15:38
Show Gist options
  • Save edwindotcom/5632807 to your computer and use it in GitHub Desktop.
Save edwindotcom/5632807 to your computer and use it in GitHub Desktop.
simple launch browser
#!/usr/bin/env python
from marionette import Marionette
from gaiatest.apps.browser.app import Browser
# remember to 'adb forward tcp:2828 tcp:2828'
m = Marionette('localhost', 2828)
m.start_session()
browser = Browser(m)
browser.launch()
browser.go_to_url('http://www.mozilla.com')
print browser.url
browser.tap_go_button()
# other stuff here:
n = m.find_element('css selector', 'iframe[src*="firefoxos"]')
n.get_attribute('src')
u'https://firefoxos.persona.org/sign_in#NATIVE'
m.switch_to_frame(n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment