pages.accounts package¶
Subpackages¶
Submodules¶
pages.accounts.base module¶
Basic page parent for all Accounts pages.
-
class
pages.accounts.base.AccountsBase(driver, base_url=None, timeout=10, **url_kwargs)[source]¶ Bases:
pypom.page.PageThe base page for each Accounts class.
-
class
Content(page, root=None)[source]¶ Bases:
pypom.region.RegionThe main content region.
-
property
header¶ Return the page heading.
- Returns
the body content header
- Return type
str
-
view_log_in() → pypom.page.Page[source]¶ Click the Log in tab.
- Returns
the Accounts Log in page
- Return type
-
property
Bases:
pypom.region.RegionThe Accounts footer.
Return the brief copyright message.
- Returns
the short copyright message displayed on Accounts pages
- Return type
str
Click the Rice University logo.
- Returns
the Rice University home page
- Return type
- :raises
AccountsException: if the Rice webpage is not loaded
Return True if the footer is displayed.
- Returns
Trueif the Accounts footer is displayed- Return type
bool
Display the OpenStax Accounts copyright and licensing notice.
- Returns
the copyright notice
- Return type
Copyright
Display the OpenStax Accounts policies.
- Returns
the terms of use and privacy policy page
- Return type
Terms
Display the OpenStax Accounts copyright and licensing notice.
- Returns
the copyright notice
- Return type
Copyright
Display the OpenStax Accounts policies.
- Returns
the terms of use and privacy policy page
- Return type
Terms
-
class
MenuBar(page, root=None)[source]¶ Bases:
pypom.region.RegionThe Accounts menu bar.
-
go_home() → pypom.page.Page[source]¶ Follow the OpenStax logo link back to the site home page.
- Returns
the OpenStax.org web page
- Return type
-
property
is_displayed¶ Return True if the menu bar is displayed.
- Returns
Trueif the Accounts menu bar is displayed- Return type
bool
-
-
back() → pypom.page.Page[source]¶ Go to the previous page in the browser history.
- Returns
the current page
- Return type
-
close_tab()[source]¶ Close the current tab and switch to the remaining one.
Note
Assumes 2 browser tabs are open; switches the window handle to the remaining tab.
- Returns
None
-
property
content¶ Access the Accounts’ page content.
- Returns
the Accounts page content
- Return type
Access the Accounts’ page footer.
- Returns
the Accounts page footer
- Return type
-
is_displayed() → bool[source]¶ Return True when the Accounts content is displayed.
- Returns
Truewhen the Accounts main body content is displayed- Return type
bool
-
property
is_safari¶ Return True if the browser in use is Safari.
- Returns
Trueif the browser in use is Safari- Return type
bool
-
property
loaded¶ Return True when the Accounts page is loaded.
Note
We delay the check by 1/2 second for Safari and Firefox to insure the page is loading prior to the full DOM
load.- Returns
Truewhen the Accounts content is found- Return type
bool
-
property
location¶ Return the current URL.
- Returns
the current page URL
- Return type
str
Access the Accounts’ page menu bar, if found.
- Returns
the Accounts’ menu bar or
Noneif it is missing (Profile)- Return type
MenuBaror None
-
property
page_source¶ Return the current page source HTML.
- Returns
the current page source
- Return type
str
-
resize_window(width: int = 1024, height: int = 768)[source]¶ Set the browser window size.
Note
We default to a standard 4:3 ratio 1024px x 768px.
- Parameters
width (int) – (optional) the desired browser window width
height (int) – (optional) the desired browser window height
- Returns
None
-
property
url¶ Return the last segment of the current URL.
- Returns
the final segment of the current URL (everything after the last ‘/’)
- Return type
str
-
class
pages.accounts.home module¶
Home page objects.
-
class
pages.accounts.home.AccountsHome(driver, base_url=None, timeout=10, **url_kwargs)[source]¶ Bases:
pages.accounts.base.AccountsBaseThe Accounts log in page.
-
class
Content(page, root=None)[source]¶ Bases:
pages.accounts.base.Content,regions.accounts.social.SocialLoginsThe log in pane.
-
property
email¶ Return the current email field address.
- Returns
the current email form field value
- Return type
str
-
property
email_error¶ Return the email error message.
- Returns
the email field error message, if found
- Return type
str
-
property
email_has_error¶ Return True if the email field has an error.
- Returns
Trueif an error message is displayed below the email field- Return type
bool
-
forgot_your_password() → pages.accounts.reset.ResetPassword[source]¶ Click the Forgot your password? link.
- Returns
the Reset my password page
- Return type
ResetPassword
-
property
password¶ Return the current password field value.
- Returns
the current password form field value
- Return type
str
-
property
password_error¶ Return the password error message.
- Returns
the password field error message, if found
- Return type
str
-
property
password_has_error¶ Return True if the password field has an error.
- Returns
Trueif an error message is displayed below the password field- Return type
bool
-
property
-
URL_TEMPLATE= '/i/login'¶
-
log_in(username: str, password: str, destination: Optional[pypom.page.Page] = None, base_url: Optional[str] = None, **kwargs) → pypom.page.Page[source]¶ Log a user into the site.
- Parameters
username (str) – the username or email address for the user
password (str) – the password for the user
destination (Page) – (optional) a Page destination, if known
base_url (str) – (optional) the base URL for the destination Page
kwargs – (optional) additional keyword arguments for the Page
- Returns
the user’s profile, a legal page, or the originating page
- Return type
Page
-
service_log_in(user: str, password: str, destination: Optional[pypom.page.Page] = None, url: Optional[str] = None, **kwargs) → pypom.page.Page[source]¶ Log into the site with a specific user from another service.
Note
Included for backwards compatibility
-
student_signup(first_name: str, last_name: str, password: str, email: Optional[utils.email.RestMail] = None, page: Optional[pypom.page.Page] = None, base_url: Optional[str] = None) → pypom.page.Page[source]¶ Register a new student user.
- Parameters
first_name (str) – the user’s first name
last_name (str) – the user’s last name
password (str) – the user’s selected password
email (
RestMail) – (optional) a provided RestMail address; if one is not given, an automatically generated one will be usedpage (
Page) – (optional) the expected page returnbase_url (str) – the template base URL for the returned page
- Returns
the sign up page if there is an error, the user profile if the user signed up from Accounts, or the originating page if redirected from another OpenStax product
- Return type
Page
-
class
pages.accounts.profile module¶
Profile page for logged in users.
-
class
pages.accounts.profile.Alert(page, root=None)[source]¶ Bases:
pypom.region.RegionA fade alert.
-
close() → Union[pypom.page.Page, pypom.region.Region][source]¶ Click the alert close ‘x’ button.
- Returns
the alert box’s parent object
- Return type
PageorRegion
-
property
message¶ Return the alert message.
- Returns
the alert message text
- Return type
str
-
-
class
pages.accounts.profile.FieldEdit(page, root=None)[source]¶ Bases:
pypom.region.RegionAccept and cancel field edit buttons.
-
accept() → pages.accounts.profile.Profile[source]¶ Click the accept checkmark button.
- Returns
the user profile
- Return type
-
cancel() → pages.accounts.profile.Profile[source]¶ Click the cancel x button.
- Returns
the user profile
- Return type
-
property
error¶ Return the error message.
- Returns
the field error message, if found
- Return type
str
-
-
class
pages.accounts.profile.GroupedProviders(page, root=None)[source]¶ Bases:
pypom.region.RegionThe available or in use log in options pane.
-
class
pages.accounts.profile.Popup(page, root=None)[source]¶ Bases:
pypom.region.RegionA confirmation pop up.
-
cancel() → pypom.page.Page[source]¶ Click the ‘Cancel’ button.
- Returns
the current page
- Return type
Page
-
property
message¶ Return the pop up box message.
- Returns
the pop up box text content
- Return type
str
-
-
class
pages.accounts.profile.Profile(driver, base_url=None, timeout=10, **url_kwargs)[source]¶ Bases:
pages.accounts.base.AccountsBaseA user profile.
-
class
Console(page, root=None)[source]¶ Bases:
pypom.region.RegionThe admin console links.
-
class
PopupConsole(page, root=None)[source]¶ Bases:
pypom.region.RegionThe quick-links admin pop up console control.
-
class
Links(page, root=None)[source]¶ Bases:
pypom.region.RegionAccounts program links section.
-
view_api_documentation() → pages.accounts.admin.docs.APIDocumentation[source]¶ View the Accounts API v1 documentation.
- Returns
the API v1 documentation
- Return type
APIDocumentation
-
view_contracts() → pages.accounts.admin.contracts.Contracts[source]¶ View the FinePrint contracts.
- Returns
the FinePrint terms of use and privacy policy contracts page
- Return type
Contracts
-
-
class
Users(page, root=None)[source]¶ Bases:
pypom.region.RegionUser section.
-
class
Result(page, root=None)[source]¶ Bases:
pypom.region.Regionclass for the search list column.
-
edit() → pages.accounts.admin.users.Details[source]¶ Edit the selected user.
- Returns
the user details page for the selected user
- Return type
-
property
first_name¶ Return the user’s first name.
- Returns
the user’s first name
- Return type
str
-
property
id¶ Return the user id.
- Returns
the user identification number
- Return type
str
-
property
is_admin¶ Return True if the user is an administrator.
- Returns
Trueif the user is an Accounts administrator- Return type
bool
-
property
is_test¶ Return True if the user is a test user.
- Returns
Trueif the user is marked as a test account- Return type
bool
-
property
last_name¶ Return the user’s last name.
- Returns
the user’s last name
- Return type
str
-
sign_in_as() → pages.accounts.profile.Profile[source]¶ Sign in to Accounts as the user.
- Returns
the selected user’s profile
- Return type
-
property
username¶ Return the username.
- Returns
the username
- Return type
str
-
-
class
-
view_full_console() → pages.accounts.admin.base.AccountsAdmin[source]¶ Click the ‘Full Console >>’ link.
- Returns
the full administrator console
- Return type
-
view_links() → pages.accounts.profile.Profile.Console.PopupConsole.Links[source]¶ Access the pop up console links tab.
- Returns
the pop up console displaying the miscellaneous tab
- Return type
Links
-
class
-
property
is_admin¶ Return True if the user is a site administrator.
- Returns
Trueif the console links are found- Return type
bool
-
class
-
class
Content(page, root=None)[source]¶ Bases:
pypom.region.RegionThe profile data pane.
-
class
Emails(page, root=None)[source]¶ Bases:
pypom.region.RegionAccount emails.
-
class
Email(page, root=None)[source]¶ Bases:
pages.accounts.profile.FieldEditAn individual account email.
-
delete() → pages.accounts.profile.Popup[source]¶ Click the ‘Delete’ link.
- Returns
the delete confirmation pop up
- Return type
-
property
email¶ Return the email address.
- Returns
the email address
- Return type
str
-
property
is_confirmed¶ Return True if the email address is confirmed.
- Returns
Trueif the unconfirmed warning is not found- Return type
bool
-
property
is_expanded¶ Return True if the email pane is expanded.
- Returns
Truewhen theexpandedclass is found on the email root element- Return type
bool
-
let_other_users_find_me_by_this_email() → pages.accounts.profile.Profile.Content.Emails.Email[source]¶ Click the ‘Let other users find me…’ checkbox.
- Returns
the email address section
- Return type
Email
-
-
add_email_address() → pages.accounts.profile.Profile.Content.Emails.Email[source]¶ Click the ‘Add email address’ link.
- Returns
the new account email entry form
- Return type
Email
-
property
emails¶ Access the current emails list.
- Returns
the account emails
- Return type
list(
Email)
-
property
new_email¶ Access the new email entry.
- Returns
the new account email entry form
- Return type
Email
-
class
-
class
EnabledProviders(page, root=None)[source]¶ Bases:
pages.accounts.profile.GroupedProvidersEnabled log in providers.
-
class
Name(page, root=None)[source]¶ Bases:
pages.accounts.profile.FieldEditThe user name.
-
change_name() → pages.accounts.profile.Profile.Content.Name[source]¶ Click the user’s name.
- Returns
the user’s name pane
- Return type
Name
-
property
first_name¶ Return the current first name value.
- Returns
the current user’s first name
- Return type
str
-
property
full_name¶ Return the current name value.
- Returns
the current user’s name
- Return type
str
-
get_name_parts() → Tuple[str, str, str, str][source]¶ Return the four name parts.
- Returns
the four parts of a user profile name (title, first name, last name and suffix)
- Return type
tuple(str, str, str, str)
-
property
last_name¶ Return the current last name value.
- Returns
the current user’s last name
- Return type
str
-
property
suffix¶ Return the current suffix value.
- Returns
the current user’s suffix
- Return type
str
-
property
title¶ Return the current title value.
- Returns
the current user’s title
- Return type
str
-
-
class
OtherProviders(page, root=None)[source]¶ Bases:
pages.accounts.profile.GroupedProvidersOther provider options.
-
class
Username(page, root=None)[source]¶ Bases:
pages.accounts.profile.FieldEditThe username.
-
change_username() → pages.accounts.profile.Profile.Content.Username[source]¶ Click the username.
- Returns
the username pane
- Return type
Username
-
clear_username() → pages.accounts.profile.Profile.Content.Username[source]¶ Click the clear field ‘x’ button.
- Returns
the username pane
- Return type
Username
-
property
username¶ Return the current username.
- Returns
the current username
- Return type
str
-
-
property
enabled_providers¶ Access the enabled log in providers section.
- Returns
the enabled log in providers section
- Return type
EnabledProviders
-
property
has_username¶ Return True if the current user has an assigned username.
- Returns
Trueif the account has a username- Return type
bool
-
home() → pages.web.home.WebHome[source]¶ Click on the OpenStax logo.
- Returns
the OpenStax.org web page
- Return type
-
log_out() → pypom.page.Page[source]¶ Click the ‘Log out’ link.
- Returns
the Accounts sign in page
- Return type
-
property
other_providers¶ Access the available log in providers section.
- Returns
the available log in providers section
- Return type
OtherProviders
-
redirect() → pypom.page.Page[source]¶ Click the redirect ‘x’ button.
- Returns
the originating page or the user profile if the originator is Accounts
- Return type
PageorProfile
-
property
title¶ Return the page title.
- Returns
the page title
- Return type
str
-
property
username¶ Access the username section.
- Returns
the username section
- Return type
Username
-
class
-
URL_TEMPLATE= '/i/profile'¶
-
property
console¶ Access the admin console links.
- Returns
the admin console links
- Return type
-
class
-
class
pages.accounts.profile.Provider(page, root=None)[source]¶ Bases:
pypom.region.RegionA log in provider.
-
delete() → Provider.Popup[source]¶ Remove the log in method from the account.
- Returns
the confirmation pop up box
- Return type
-
edit() → pages.accounts.reset.ChangePassword[source]¶ Edit the password log in method.
- Returns
the change password form
- Return type
ChangePassword
-
property
name¶ Return the provider name.
- Returns
the provider name
- Return type
str
-
pages.accounts.signup module¶
Break the signup process out of the base.
-
class
pages.accounts.signup.ChangeYourEmail(driver, base_url=None, timeout=10, **url_kwargs)[source]¶ Bases:
pages.accounts.base.AccountsBaseThe email change request page.
-
class
Content(page, root=None)[source]¶ Bases:
pages.accounts.base.Content,regions.accounts.fields.EmailThe email change request pane.
-
URL_TEMPLATE= '/i/change_your_email'¶
-
class
-
class
pages.accounts.signup.CompleteSignup(driver, base_url=None, timeout=10, **url_kwargs)[source]¶ Bases:
pages.accounts.base.AccountsBaseThe account setup completion page.
-
class
Content(page, root=None)[source]¶ Bases:
pages.accounts.base.ContentThe signup completion pane.
-
property
email¶ Return the email address used during registration.
- Returns
the email address used during registration
- Return type
str
-
exit() → pypom.page.Page[source]¶ Click the page return ‘x’ button.
- Returns
the user profile or the origination page
- Return type
Page
-
finish() → pypom.page.Page[source]¶ Click the ‘Finish’ button.
- Returns
the account profile or the originating page
- Return type
Page
-
property
information¶ Return the email information message.
- Returns
the email information message
- Return type
str
-
property
-
URL_TEMPLATE= '/i/done'¶
-
class
-
class
pages.accounts.signup.ConfirmEmail(driver, base_url=None, timeout=10, **url_kwargs)[source]¶ Bases:
pages.accounts.base.AccountsBaseThe email confirmation page.
-
class
Content(page, root=None)[source]¶ Bases:
pages.accounts.base.Content,regions.accounts.fields.PinThe email confirmation pane.
-
confirm_my_account() → Union[pages.accounts.signup.ConfirmEmail, pages.accounts.signup.CompleteSignup][source]¶ Click the Continue button.
- Returns
the email confirmation (second step) if there are errors or the completion page (third step)
- Return type
-
edit_your_email() → pages.accounts.signup.ChangeYourEmail[source]¶ Click the ‘edit your email’ link.
- Returns
the change your email page
- Return type
-
property
email¶ Return the email address used during registration.
- Returns
the email address used during registration
- Return type
str
-
property
information¶ Return the email information message.
- Returns
the email information message
- Return type
str
-
property
pin¶ Return the current PIN value.
- Returns
the current pin value
- Return type
str
-
-
URL_TEMPLATE= '/i/confirmation_form'¶
-
class
-
class
pages.accounts.signup.EducatorSignup(driver, base_url=None, timeout=10, **url_kwargs)[source]¶ Bases:
pages.accounts.signup.SignupOldThe educator sign up process.
-
class
pages.accounts.signup.Signup(driver, base_url=None, timeout=10, **url_kwargs)[source]¶ Bases:
pages.accounts.base.AccountsBaseThe Accounts sign up process.
-
class
Content(page, root=None)[source]¶ Bases:
pages.accounts.base.ContentThe sign up pane.
-
DESCRIPTION= ' ~ div'¶
-
property
educator_description¶ Return the educator sign up explanation text.
- Returns
the explanation why educators should register for an OpenStax account
- Return type
str
-
sign_up_as_a_student() → pages.accounts.signup.StudentSignup[source]¶ Click the student sign up button.
- Returns
the student registration process
- Return type
-
sign_up_as_an_educator() → pages.accounts.signup.EducatorSignup[source]¶ Click the educator sign up button.
- Returns
the educator registration process
- Return type
-
property
student_description¶ Return the student sign up explanation text.
- Returns
the explanation why students should register for an OpenStax account
- Return type
str
-
-
URL_TEMPLATE= '/i/signup'¶
-
class
-
class
pages.accounts.signup.SignupOld(driver, base_url=None, timeout=10, **url_kwargs)[source]¶ Bases:
pages.accounts.base.AccountsBaseLegacy signup process.
-
ADMINISTRATOR= 'Administrator'¶
-
ADOPTED= 'Fully adopted and using it as the primary textbook'¶
-
DESIGNER= 'Instructional Designer'¶
-
FIRST= 1¶
-
GOOGLE= 'google'¶
-
GUERRILLA_MAIL= 'guerrilla'¶
-
INSTRUCTOR= 'Instructor'¶
-
INTEREST= 'Interested in using OpenStax in the future'¶
-
class
InstructorNotice(page, root=None)[source]¶ Bases:
pypom.region.RegionComplete the instructor signup.
-
class
InstructorVerification(page, root=None)[source]¶ Bases:
pypom.region.RegionInstructor verification fields.
-
class
Subject(page, root=None)[source]¶ Bases:
pypom.region.RegionBook subject.
-
property
title¶ Get the book title.
-
property
-
property
phone¶ Return the telephone number field.
-
property
students¶ Return the student count field.
-
property
subjects¶ Return a list of book subjects.
-
property
using¶ Return the instructor’s intent field.
-
property
webpage¶ Return the webpage verification field.
-
class
-
LAST= 2¶
-
LIBRARIAN= 'Librarian'¶
-
NOT_USING= 'Not using OpenStax'¶
-
OTHER= 'Other'¶
-
class
PinVerification(page, root=None)[source]¶ Bases:
pypom.region.RegionPin verification.
-
property
pin_failure¶ Return True if an error occurs during pin verification.
-
property
verify_pin¶ Return the pin input.
-
property
-
RECOMMENDED= 'Recommending the book – my students buy a different book'¶
-
RESTMAIL= 'restmail'¶
-
STUDENT= 'Student'¶
-
SUBJECTS= [('accounting', 'Accounting'), ('algebra_and_trigonometry', 'Algebra and Trigonometry'), ('american_government', 'American Government'), ('anatomy_physiology', 'Anatomy and Physiology'), ('astronomy', 'Astronomy'), ('biology', 'Biology'), ('calculus', 'Calculus'), ('chemistry', 'Chemistry'), ('chem_atoms_first', 'Chemistry: Atoms First'), ('college_algebra', 'College Algebra'), ('college_physics_algebra', 'College Physics'), ('concepts_of_bio_non_majors', 'Concepts of Biology'), ('introduction_to_business', 'Introduction to Business'), ('introduction_to_sociology', 'Introduction to Sociology 2e'), ('introductory_statistics', 'Introductory Statistics'), ('microbiology', 'Microbiology'), ('pre_algebra', 'Prealgebra'), ('precalc', 'Precalculus'), ('economics', 'Principles of Economics'), ('macro_econ', 'Principles of Macroeconomics'), ('ap_macro_econ', 'Principles of Macroeconomics for AP® Courses'), ('micro_econ', 'Principles of Microeconomics'), ('ap_micro_econ', 'Principles of Microeconomics for AP® Courses'), ('psychology', 'Psychology'), ('ap_physics', 'The AP Physics Collection'), ('us_history', 'U.S. History'), ('university_physics_calc', 'University Physics'), ('not_listed', 'Not Listed')]¶
-
SUFFIX= 3¶
-
class
SetPassword(page, root=None)[source]¶ Bases:
pypom.region.RegionSet the user’s password.
-
property
confirmation¶ Return the confirmation field.
-
property
get_error¶ Return password error(s).
-
property
has_error¶ Return True if error messages are displayed.
-
property
password¶ Return the password field.
Go to the social login setup.
-
property
-
class
SocialLogin(page, root=None)[source]¶ Bases:
pypom.region.RegionSign up using a social app profile.
-
URL_TEMPLATE= '/social'¶
-
property
use_a_password¶ Use a non-social log in.
-
property
use_facebook¶ Use Facebook to log in.
-
property
use_google¶ Use Google to log in.
-
-
TITLE= 0¶
-
URL_TEMPLATE= '/signup'¶
-
class
UserFields(page, root=None)[source]¶ Bases:
pypom.region.RegionStandard user fields.
-
property
first_name¶ Return the first name field.
-
property
last_name¶ Return the surname field.
-
property
school¶ Return the school field.
-
property
-
class
UserType(page, root=None)[source]¶ Bases:
pypom.region.RegionInitial signup pane for type selection.
-
property
email¶ Return the email input.
-
property
role¶ Return the role select.
-
property
warning¶ Return the warning text.
-
property
warning_present¶ Return True if the e-mail warning is displayed.
-
property
-
account_signup(email, password=None, _type='Student', provider='restmail', tutor=False, destination=None, **kwargs)[source]¶ Single signup entry point.
Sign up a new user. Social, Random, and Name are mutually exclusive.
- Parameters
email (str) – an accessible e-mail address
password (str) – the user password
_type (str) – (optional) the new user account type using *
SignupOld.STUDENT(default) *SignupOld.INSTRUCTOR*SignupOld.ADMINISTRATOR*SignupOld.LIBRARIAN*SignupOld.DESIGNER*SignupOld.OTHERprovider (str) – (optional) the e-mail host, default:
restmailgoogle: Google Gmailguerrilla: GuerrillaMailrestmail: RestMail API Emailtutor (bool) – (optional)
Trueif the signup is for OpenStax Tutor, default:Falsedestination (str) – a URL destination if not Accounts default:
None**kwarys – arbitrary keyword arguments, see below
- Returns
the new user’s profile page
- Return type
- Keyword Arguments
email_password (
str) – Webmail login passwordname (
list``(``str)) – the user’s name as [title, first_name, last_name, suffix]news (
bool) –Trueif the newsletter checkbox should be checked,Falseif the checkbox should be clearedphone (
str) – the instructor’s telephone numberschool (
str) – the school namesocial (
str) – use a social login, eitherfacebookorgooglesocial_login (
str) – the social account loginsocial_password (
str) – the social account passwordstudents (
int) – the number of students in the coursesubjects (
list``(``str)) – a list of interested book subjects *accounting*algebra_and_trigonometry*american_government*anatomy_physiology*astronomy*biology*calculus*chemistry*chem_atoms_first*college_algebra*college_physics_algebra*concepts_of_bio_non_majors*introduction_to_business*introduction_to_sociology*introductory_statistics*microbiology*pre_algebra*precalc*economics*macro_econ*ap_macro_econ*micro_econ*ap_micro_econ*psychology*ap_physics*us_history*university_physics_calc*not_listeduse (
str) – How is the instructor using OpenStax?SignupOld.ADOPTED–‘Fully adopted and using it as the primary textbook’
SignupOld.RECOMMENDED–‘Recommending the book - my students buy a different book’
SignupOld.INTEREST–‘Interested in using OpenStax in the future’
SignupOld.NOT_USING–‘Not using OpenStax’
webpage (
str) – the web URL showing the user as a known instructor
-
property
error¶ Return the error message if present.
-
property
instructor¶ Fill out the instructor verification.
-
instructor_access(role, school_email, phone_number, school, webpage, students=None, using=None, interests=None, get_newsletter=True)[source]¶ Request faculty access.
-
property
notice¶ Request notice when instructor access is authorized.
-
property
password¶ Fill out the password fields.
-
property
pin¶ Verify the e-mail pin.
Use a social login.
-
property
user¶ Fill out the user data.
-
property
user_type¶ Fill out the user type.
-
-
class
pages.accounts.signup.StudentSignup(driver, base_url=None, timeout=10, **url_kwargs)[source]¶ Bases:
pages.accounts.base.AccountsBaseThe student sign up process.
-
class
Content(page, root=None)[source]¶ Bases:
pages.accounts.base.Content,regions.accounts.fields.Email,regions.accounts.fields.FirstName,regions.accounts.fields.LastName,regions.accounts.fields.Password,regions.accounts.social.SocialLoginsThe sign up pane.
-
get_errors() → List[str][source]¶ Return a list of error messages found on the page.
- Returns
the list of error messages found on the current page
- Return type
list(str)
-
i_agree() → pages.accounts.signup.StudentSignup[source]¶ Click the I agree checkbox.
- Returns
the Accounts student sign up page
- Return type
Click the OpenStax newsletter checkbox.
- Returns
the Accounts student sign up page
- Return type
-
-
URL_TEMPLATE= '/i/signup/student'¶
-
class
pages.accounts.signup_two module¶
Break the signup process out of the base.
-
class
pages.accounts.signup_two.Pagination(page, root=None)[source]¶ Bases:
pypom.region.RegionShared page features.
-
class
pages.accounts.signup_two.Signup(driver, base_url=None, timeout=10, **url_kwargs)[source]¶ Bases:
pages.accounts.base.AccountsBaseSignup process.
-
class
Approval(page, root=None)[source]¶ Bases:
pages.accounts.signup_two.PaginationAcceptance email.
-
property
approval¶ Return the email request upon approval checkbox.
-
property
-
class
Courseware(page, root=None)[source]¶ Bases:
pages.accounts.signup_two.PaginationBook details.
-
class
Book(page, root=None)[source]¶ Bases:
pypom.region.RegionAn OpenStax book.
-
property
checkbox¶ Return the checkbox element.
-
property
image¶ Return the image element.
-
property
is_checked¶ Return True if the box is checked.
-
property
title¶ Return the book title.
-
property
-
class
Modal(page, root=None)[source]¶ Bases:
pypom.region.RegionThe Terms of Use and Privacy Policy display window.
-
property
content¶ Return the modal content text.
-
property
-
property
agreement¶ Return the ‘I agree’ checkbox.
-
property
book_error¶ Return the book error.
-
property
books¶ Return the list of available books.
Return the newsletter checkbox.
Uncheck the newsletter box.
-
property
policy¶ Access the policy modal.
-
property
students¶ Return the general student count input box.
-
class
-
class
Password(page, root=None)[source]¶ Bases:
pages.accounts.signup_two.PaginationPassword assignment.
-
property
confirmation¶ Return the password confirmation input field.
-
property
password¶ Return the password input field.
-
property
password_errors¶ Return the password errors.
Go to the social login setup.
-
property
-
class
Pin(page, root=None)[source]¶ Bases:
pages.accounts.signup_two.PaginationPin verification.
-
property
pin_error¶ Return the pin entry error message.
-
property
verify_pin¶ Return the pin verification input box.
-
property
-
class
Profile(page, root=None)[source]¶ Bases:
pages.accounts.signup_two.PaginationUser details.
-
property
first_name¶ Return the first name input field.
-
property
last_name¶ Return the last name input field.
-
property
phone_number¶ Return the telephone number input field.
-
property
profile_errors¶ Return a list of errors.
-
property
school_name¶ Return the school name input field.
-
property
webpage¶ Return the faculty verification webpage field.
-
property
-
class
Signup(page, root=None)[source]¶ Bases:
pages.accounts.signup_two.PaginationBasic user data.
-
property
email¶ Return the email input box.
-
property
email_box_is_visible¶ Return True if the email input box is visible.
-
property
email_error¶ Return the email entry error.
-
property
role¶ Return the role select parent.
-
property
warning¶ Return the warning text.
-
property
warning_is_present¶ Return True if the warning is displayed.
-
property
-
class
SocialLogin(page, root=None)[source]¶ Bases:
pypom.region.RegionSign up using a social app profile.
-
property
use_a_password¶ Use a non-social log in.
-
property
use_facebook¶ Use Facebook to log in.
-
property
use_google¶ Use Google to log in.
-
property
-
URL_TEMPLATE= '/signup'¶
-
account_signup(email, password=None, role='Student', provider='restmail', destination=None, base_url=None, **kwargs)[source]¶ Single signup entry point.
-
property
courseware¶ Access the courseware books.
-
property
instructor_access¶ Access the approval confirmation fields.
-
property
password¶ Access the password fields.
-
property
pin_verification¶ Access the pin verification.
-
property
profile¶ Access the profile fields.
-
property
sign_up¶ Access the signup page elements.
-
class