Skip to content

Instantly share code, notes, and snippets.

@rpappalax
Forked from edwindotcom/launch_browser
Created February 28, 2014 00:14
Show Gist options
  • Save rpappalax/9262553 to your computer and use it in GitHub Desktop.
Save rpappalax/9262553 to your computer and use it in GitHub Desktop.
#!/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