Skip to content

bobsilverberg/fxapom_saved

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firefox Accounts Page Object Model

Webdriver compatible page object model and utilities for Firefox Accounts

Overview

This package contains a utility to create a test Firefox Account on either the dev or prod instance of Firefox Accounts, as well as a set of page objects that can be used to interact with Firefox Accounts' sign in screens.

Usage

To create a test Firefox Account, use the create_account method in the FxATestAccount object. You should pass the base url for the site for which you are creating the account into the constructor for FxATestAccount, or, if you know you want to create a production Account, you can omit that argument.

Example:

from fxapom.fxapom import FxATestAccount
acct = FxATestAccount(base_url='https://www-dev.allizom.org').create_account()

To sign in via Firefox Accounts, use the sign_in method in the WebDriverFxA object, passing in the email addresss and password.

Example:

from fxapom.fxapom import WebDriverFxA
fxa = WebDriverFxA(mozwebqa)
fxa.sign_in(email_address, password)

To create an account and then use it to sign in, use both tools described above.

Example:

from fxapom.fxapom import FxATestAccount
from fxapom.fxapom import WebDriverFxA
acct = FxATestAccount(base_url='https://www-dev.allizom.org').create_account()
fxa = WebDriverFxA(mozwebqa)
fxa.sign_in(acct.email, acct.password)

Running The Tests

  • Install the requirements using pip install -r requirements.txt
  • Run the tests via py.test tests

License

This software is licensed under the MPL 2.0:

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%