Last active
December 17, 2015 15:38
-
-
Save edwindotcom/5632807 to your computer and use it in GitHub Desktop.
simple launch browser
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
#!/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