Last active
December 17, 2015 16:29
-
-
Save edwindotcom/5639098 to your computer and use it in GitHub Desktop.
launch persona in 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
from marionette import Marionette | |
from gaiatest.apps.browser.app import Browser | |
m = Marionette('localhost', 2828) | |
m.start_session() | |
browser = Browser(m) | |
browser.launch() | |
browser.go_to_url('http://native.123done.org\n') | |
browser.switch_to_content() | |
#wait | |
btn = m.find_element('css selector', 'img[src*="persona-login"]') | |
btn.click() | |
m.switch_to_frame() | |
n_ui = m.find_element('css selector', 'iframe[src*="firefoxos.persona.org/sign_in"]') | |
m.switch_to_frame(n_ui) | |
pp = m.find_element('link text', 'Privacy Policy') | |
pp.is_displayed() | |
# returns False, but it's I can see it on the phone | |
# I can't click on it or other controls, most everything is is_displayed = False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment