Skip to content

Instantly share code, notes, and snippets.

@pamelafox
Created January 17, 2012 02:41
Show Gist options
  • Save pamelafox/1624226 to your computer and use it in GitHub Desktop.
Save pamelafox/1624226 to your computer and use it in GitHub Desktop.
Facebook Python Selenium Tests
import base_tests
import dom_helper
import facebook_dom
class FacebookTests(base_tests.BaseTests):
@classmethod
def setUpClass(cls):
super(StartTests, cls).setUpClass()
StartTests.clear_data()
def setUp(self):
self.dom_helper = dom_helper.DomHelper(StartTests.driver, StartTests.waiter)
def tearDown(self):
return
def test_a_facebook_signup(self):
self.open('/start/signup')
self.dom_helper = facebook_dom.FacebookDom(StartTests.driver, StartTests.waiter)
self.dom_helper.click_button('#facebook-button')
self.facebook_dom.do_authorize_flow()
self.dom_helper.wait_for_title('Home')
def test_b_facebook_login(self):
self.dom_helper.click_button('#login-facebook-button')
self.facebook_dom.do_login_flow()
self.dom_helper.wait_for_title('Home')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment