pages.web package¶
Submodules¶
pages.web.about module¶
OpenStax About Us Page.
-
class
pages.web.about.AboutUs(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseAbout Us page.
-
URL_TEMPLATE= '/about'¶
-
class
WhatWeDo(page, root=None)[source]¶ Bases:
pypom.region.RegionThe What we do panel.
-
class
Card(page, root=None)[source]¶ Bases:
pypom.region.RegionAn information card.
-
property
image¶ Access the card image.
-
property
text¶ Return the card content.
-
property
-
property
cards¶ Access the cards.
-
class
-
class
WhereWereGoing(page, root=None)[source]¶ Bases:
pypom.region.RegionThe Where we’re going panel.
-
property
content_map¶ Return the content map element.
-
property
loaded¶ Wait until the three panels are displayed.
-
property
what_we_do¶ Access the What we do panel.
-
property
where_were_going¶ Access the Where we’re going panel.
-
property
who_we_are¶ Access the Who we are panel.
-
pages.web.accessibility module¶
The OpenStax Web accessibility statement page.
-
class
pages.web.accessibility.Accessibility(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe accessibility statement.
-
URL_TEMPLATE= '/accessibility-statement'¶
-
property
loaded¶ Wait until the statement is found.
-
property
sections¶ Access the section headers.
-
pages.web.adopters module¶
OpenStax material adopters.
pages.web.adoption module¶
The book adoption form.
-
class
pages.web.adoption.Adoption(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe adoption form page.
-
class
Form(page, root=None)[source]¶ Bases:
pypom.region.RegionThe adoption form.
-
class
Book(page, root=None)[source]¶ Bases:
pypom.region.RegionA book checkbox option.
-
property
checked¶ Return True if the book option is checked.
-
property
has_image¶ Return True if the book check option has an image.
-
property
image¶ Return the image element.
-
property
title¶ Return the book title.
-
property
-
class
School(page, root=None)[source]¶ Bases:
pypom.region.RegionA suggested school name.
-
property
name¶ Return the school name.
-
property
-
class
Technology(page, root=None)[source]¶ Bases:
pypom.region.RegionTechnology in use by the instructor or school.
-
property
checked¶ Return True if the company option is checked.
-
property
company¶ Return the company or product name.
-
property
-
class
Using(page, root=None)[source]¶ Bases:
pypom.region.RegionAdditional information concerning each book adoption.
-
property
students¶ Return the students input element.
-
property
students_error¶ Return the error message, if any, on the student field.
-
property
title¶ Return the book title.
-
property
using_error¶ Return the error message, if any, on the radio fields.
-
property
-
property
books¶ Access the book selector checkboxes.
-
property
email¶ Return the email input box.
-
property
first_name¶ Return the first name input box.
-
property
get_book_error¶ Return the book section error message.
-
property
get_user_errors¶ Return the error messages.
-
property
get_using_errors¶ Return the usage section error messages.
-
go_back(destination=<class 'pages.web.base.WebBase'>, url=None)[source]¶ Click the student GO BACK button.
-
property
last_name¶ Return the last name input box.
-
property
loaded¶ Return True when the form is visible.
-
property
options¶ Return the option menu responses.
-
property
other¶ Return the other option input box.
-
property
phone¶ Return the phone number input box.
-
property
school¶ Return the school name input box.
-
property
school_suggestions¶ Return a list of school name suggestions.
Based on a filter of the text in the school name input box.
-
property
student_message¶ Return the message content for student users.
Drop the text from the child element first.
-
property
technology¶ Access the technology provider information sections.
-
property
usage¶ Access the usage information section for each selected book.
-
class
-
URL_TEMPLATE= '/adoption'¶
-
property
form¶ Access the adoption form.
-
property
loaded¶ Wait until the form is found.
-
submit_adoption(user_type, first, last, email, phone, school, books, tech_providers=None, other_provider=None)[source]¶ Fill out and submit the adoption form.
- Args:
- user_type (str): the user’s role
Web.STUDENT, Web.INSTRUCTOR, Web.ADMINISTRATOR, Web.LIBRARIAN, Web.DESIGNER, Web.HOMESCHOOL, Web.ADJUNCT, or Web.OTHER
first (str): the user’s first name last (str): the user’s last name email (str): the user’s email address phone (str): the user’s telephone number school (str): the user’s school affiliation books (dict): a dictionaries of dictionaries for adopted books
Book short name (str): the shortened book title Adoption status (str): Web.ADOPTED or Web.RECOMMENDED Students (int): number of students being taught per semester
- {
- ‘AP Biology’: {
‘status’: Web.ADOPTED, ‘students’: 30
}, <book-short-name>: {
‘status’: <status>, ‘students’: <students>
}
}
- tech_providers (list): a list of technology partners under use
[Web.TechProviders.<provider>]
- other_provider (str): a string of unlisted providers to be
used when Web.TechProviders.OTHER is in tech_providers
-
class
-
class
pages.web.adoption.AdoptionConfirmation(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe adoption confirmation page.
-
URL_TEMPLATE= '/adoption-confirmation'¶
-
property
another¶ Return the ‘Report another …’ link.
-
property
loaded¶ Wait until the confirmation is displayed.
-
property
survey_available¶ Return True if a survey is available.
-
pages.web.base module¶
Basic page parent for all OpenStax Web pages.
-
class
pages.web.base.WebBase(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pypom.page.PageBase class.
-
close_tab()[source]¶ Close the current tab and switch to the remaining one.
Assumes 2 browser tabs are open.
Return Web footer.
-
property
is_phone¶ Return True if the browser window is within the phone width.
-
property
is_safari¶ Return True if the browser in use is Safari.
-
property
loaded¶ Return True when the page-loaded class is added to the body tag.
-
property
location¶ Return the current page URL.
- Returns
the current page URL
- Return type
str
Access the OpenStax header navigation.
-
property
privacy_notice¶ Access the privacy notice.
-
reload()[source]¶ Reload the current page.
Ignore stale element issues because we’re reloading the page; everything is going to be stale if accessed too quickly (multi-process Firefox issue).
-
resize_window(width=1024, height=768)[source]¶ Set the browser window size.
- Args:
width (int): browser window width, default 4:3 height (int): browser window height, default 4:3
-
property
sticky_note¶ Access the sticky note.
-
property
survey¶ Access the Pulse Insights pop up survey.
-
property
url¶ Return the last segment of the current URL.
Access the website header navigation.
-
pages.web.blog module¶
The OpenStax blog.
-
class
pages.web.blog.Article(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.blog.BlogThe OpenStax web log article.
-
URL_TEMPLATE= '/blog/{article}'¶
-
property
disqus¶ Return the Disqus iframe.
- Returns
the Disqus iframe element
- Return type
WebElement
-
is_displayed()[source]¶ Return True if the blog article banner image is displayed.
- Returns
Trueif the blog article banner image and the Disqus comments widget are displayed- Return type
bool
-
property
title¶ Return the article title.
- Returns
the blog article title
- Return type
str
-
-
class
pages.web.blog.Blog(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe OpenStax web log.
-
class
Tile(page, root=None)[source]¶ Bases:
pypom.region.RegionA blog entry overview tile.
Return the article authors and editors.
- Returns
the article author(s)/editor(s) as a single string
- Return type
str
-
property
date¶ Return the article publish date string.
- Returns
the article’s publish date string
- Return type
str
-
property
excerpt¶ Return the article excerpt or subheading.
- Returns
the trimmed article excerpt or the article subheading plus the excerpt
- Return type
str
-
get_date()[source]¶ Return a timezone-aware datetime of the publish date.
- Returns
the article’s publish date as a timezone-aware datetime
- Return type
datetime
-
property
image¶ Return the tile picture element.
- Returns
the tile’s banner image element
- Return type
WebElement
-
is_displayed()[source]¶ Return True if the tile has children.
- Returns
Trueif the tile is displayed and the tile has loaded child elements (it entered the viewable window for at least 0.1 seconds)- Return type
bool
-
property
title¶ Return the article title.
- Returns
the blog article title
- Return type
str
-
URL_TEMPLATE= '/blog'¶
-
property
articles¶ Return a list of articles.
Include the pinned article, if it exists.
- Returns
a list of available blog entries
- Return type
list(
Article)
Select the ‘Sign Up’ button.
- Returns
the OpenStax newsletter signup form in a new window
- Return type
-
is_displayed()[source]¶ Return True if the blog pinned article is displayed.
- Returns
Truewhen the pinned blog article entry is displayed- Return type
bool
-
property
loaded¶ Return True when all of the blog article images are loaded.
- Returns
Truewhen the blog article background images are loaded- Return type
bool
-
property
other_posts¶ Return the other blog entry tiles.
- Returns
a list of blog entries, excluding the pinned article
- Return type
list(
Article)
-
test_rss_feed()[source]¶ Query the RSS feed URL.
- Returns
the result from a HEAD request to the RSS feed
- Return type
Response
-
view_post(title=None, index=None)[source]¶ Open a blog entry to view the full article.
If no title or index is provided, return a random blog article
- Parameters
title (str) – (optional) select an article to view by its title
index (int) – (optional) select an article by it list index
- Returns
a blog article
- Return type
-
class
pages.web.book module¶
A marketing page for an OpenStax book.
-
class
pages.web.book.Accordion(page, root=None)[source]¶ Bases:
pypom.region.RegionA base region for phone-view expandable menus.
-
property
is_open¶ Return True if the menu is open.
-
property
-
class
pages.web.book.AccordionSubRegion(page, root=None)[source]¶ Bases:
pages.web.book.AccordionA base region for accordion subsections.
-
class
pages.web.book.Book(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseA book details page.
-
class
Details(page, root=None)[source]¶ Bases:
pypom.region.RegionThe book details main region.
-
property
digital_isbns¶ Return the digital book ISBNs.
-
property
errata_append¶ Return the errata URL append.
-
property
errata_text¶ Return the errata explanation text.
Return True if the contributing authors section exists.
Return True if the senior authors section exists.
-
property
ibook_isbns¶ Return the iBook ISBNs.
-
property
license¶ Return the license information.
Return the list of non-senior authors.
-
property
options¶ Return the available sideboar options.
-
property
print_isbns¶ Return the print book ISBNs.
-
property
published_on¶ Return the publishing date.
Return the list of senior authors.
-
property
summary¶ Return the book summary.
-
property
-
class
InstructorResources(page, root=None)[source]¶ Bases:
pages.web.book.ResourceTabThe instructor resources tab.
-
property
oer_commons¶ Return the OER Commons resource.
-
property
partners¶ Return a list of available resources.
-
property
tech_options¶ Return the partners heading element.
-
property
-
class
PartnerResources(page, root=None)[source]¶ Bases:
pages.web.book.ResourceTabThe partner resources tab.
-
property
partners¶ Return a list of available resources.
-
property
resources¶ Override the resource box property.
-
property
-
class
PhoneDisplay(page, root=None)[source]¶ Bases:
pypom.region.RegionThe book details page for small devices.
-
class
CompactBookDetails(page, root=None)[source]¶ Bases:
pages.web.book.AccordionThe compact bood details pane.
-
class
Authors(page, root=None)[source]¶ Bases:
pages.web.book.AccordionSubRegionThe authors information section.
Return True if the other authors section exists.
Return True if the senior authors section exists.
Return a list of non-senior authors.
Return a list of senior authors.
-
class
ProductDetails(page, root=None)[source]¶ Bases:
pages.web.book.AccordionSubRegionThe product details information section.
-
property
digital_isbns¶ Return the digital book ISBNs.
-
property
ibook_isbns¶ Return the iBook ISBNs.
-
property
license¶ Return the license information.
-
property
print_isbns¶ Return the print book ISBNs.
-
property
Access the authors section.
-
property
product_details¶ Access the product details section.
-
property
summary¶ Return the book summary text.
-
class
-
class
CompactErrata(page, root=None)[source]¶ Bases:
pages.web.book.AccordionThe compact errata information pane.
-
property
errata_append¶ Return the errata URL append.
-
property
errata_text¶ Return the errata explanation text.
-
property
-
class
CompactInstructorResources(page, root=None)[source]¶ Bases:
pages.web.book.AccordionThe compact instructor resource pane.
-
property
partners¶ Return the list of available partner resources.
-
property
resources¶ Return the list of available instructor resources.
-
property
-
class
CompactStudentResources(page, root=None)[source]¶ Bases:
pages.web.book.AccordionThe compact student resource pane.
-
property
resources¶ Return the list of available student resources.
-
property
-
class
CompactTableOfContents(page, root=None)[source]¶ Bases:
pages.web.book.AccordionThe compact table of contents pane.
-
property
chapters¶ Access the chapter list.
-
property
-
property
details¶ Access the book details pane.
-
property
errata¶ Access the errata pane.
-
property
ibooks¶ Return the available iBook links.
-
property
instructor¶ Access the instructor resources pane.
-
property
options¶ Return the available sideboar options.
-
property
order_book¶ Access the book order options.
-
property
student¶ Access the student resources pane.
-
property
table_of_contents¶ Access the table of contents pane.
Open the Bookshare page for the textbook.
-
class
-
class
Sidebar(page, root=None)[source]¶ Bases:
pypom.region.RegionThe large view sidebar.
-
property
ibooks¶ Return the available iBook links.
-
property
options¶ Return the available sideboar options.
-
property
order_book¶ Access the book order options.
-
property
pdf_url¶ Return the book PDF download URL.
-
property
table_of_contents¶ Access the book table of contents.
Open the Bookshare page for the textbook.
-
property
-
class
StudentResources(page, root=None)[source]¶ Bases:
pages.web.book.ResourceTabThe student resources tab.
-
URL_TEMPLATE= '/details/books/{book_name}'¶
-
property
details¶ Access the book details.
-
property
instructor¶ Access the instructor resources.
-
property
loaded¶ Return True when the book details page is loaded.
-
property
phone¶ Access the book details for mobile devices.
Access the sidebar links.
-
property
student¶ Access the student resources.
-
property
table_of_contents¶ Shortcut the table of contents.
-
property
tabs¶ Return the resource tabs.
-
property
title¶ Return the book title.
-
class
-
class
pages.web.book.BookOrder(page, root=None)[source]¶ Bases:
pages.web.book.ModalThe book order modal dialog box.
-
class
Box(page, root=None)[source]¶ Bases:
pypom.region.RegionAn order box.
-
property
additional_information¶ Return any post-button information.
-
property
description¶ Return the box description.
-
property
title¶ Return the intended user type.
-
property
-
property
boxes¶ Access the order boxes.
-
class
-
class
pages.web.book.Chapter(page, root=None)[source]¶ Bases:
pypom.region.RegionAn individual book chapter listing.
-
property
chapter¶ Return the chapter number.
-
property
sections¶ Return the section names.
-
property
title¶ Return the chapter title.
-
property
-
class
pages.web.book.CompCopyRequest(page, root=None)[source]¶ Bases:
pages.web.book.ModalThe complementary book copy request form modal box.
-
property
cover¶ Return the book cover image element.
-
property
is_valid¶ Return True if the student input is valid.
-
property
loaded¶ Return True when the modal content exists.
-
property
students¶ Return the students enrollment input box.
-
property
title¶ Return the book title being requested.
-
property
-
class
pages.web.book.CompCopyRequestReceipt(page, root=None)[source]¶ Bases:
pages.web.book.ModalThe request receipt modal box.
-
property
heading¶ Return the banner title text.
-
property
loaded¶ Wait until the confirmation message is available.
-
property
text¶ Return the confirmation message.
-
property
-
class
pages.web.book.Modal(page, root=None)[source]¶ Bases:
pypom.region.RegionA base setup for the page modals.
-
property
root¶ Override the root variable.
-
property
-
class
pages.web.book.Partner(page, root=None)[source]¶ Bases:
pypom.region.RegionA partner resource.
-
property
cost¶ Return the resource average cost range.
- Returns
the partner resource average cost range
- Return type
str
-
property
name¶ Return the partner’s name.
- Returns
the partner resource name
- Return type
str
-
property
type¶ Return the partner resource type.
- Returns
the partner resource type
- Return type
str
-
property
-
class
pages.web.book.Resource(page, root=None)[source]¶ Bases:
pypom.region.RegionA resource box.
-
property
can_be_downloaded¶ Return True if the resource is available for download.
-
property
description¶ Return the resource description.
-
property
is_external¶ Return True if the resource is an external site.
-
property
is_locked¶ Return True if the resource is locked requiring a login.
-
property
status_message¶ Return the status message text.
-
property
title¶ Return the resource title or company name.
-
property
-
class
pages.web.book.ResourceTab(page, root=None)[source]¶ Bases:
pypom.region.RegionA base region for instructor and student resources.
-
property
resources¶ Return a list of available resources.
-
property
slogan¶ Return the instructor resource slogan.
-
property
-
class
pages.web.book.TableOfContents(page, root=None)[source]¶ Bases:
pypom.region.RegionThe book table of contents slide-out display.
-
class
Section(page, root=None)[source]¶ Bases:
pypom.region.RegionA table of contents chapter or other primary content.
-
class
Unit(page, root=None)[source]¶ Bases:
pypom.region.RegionA chapter or content sub-unit.
-
property
number¶ Return the section or subsection number.
- Returns
the section or subsection number, if found, otherwise an empty string
- Return type
str
-
property
title¶ Return the section or subsection title.
- Returns
the section or subsection title
- Return type
str
-
property
unnumbered¶ Return True if the section or subsection is unnumbered.
- Returns
Trueif the section or subsection is unnumbered- Return type
bool
-
property
url¶ Return the CNX URL for the section.
- Returns
the CNX URL for the linked section
- Return type
str
-
property
-
property
number¶ Return the chapter or content number.
- Returns
the chapter or content number, if found, otherwise an empty string
- Return type
str
-
property
subsections¶ Access the chapter or content units.
- Returns
the list of available units or subsections
- Return type
list(
Unit)
-
property
title¶ Return the chapter or content title.
- Returns
the chapter or content title
- Return type
str
-
property
unnumbered¶ Return True if the chapter or content is unnumbered.
- Returns
Trueif the chapter or content is unnumbered- Return type
bool
-
class
-
property
chapters¶ Access the chapter list.
-
close() → pages.web.book.Book[source]¶ Close the table of contents.
- Returns
the book page
- Return type
-
is_displayed() → bool[source]¶ Return True when the table of contents is open.
- Returns
Truewhen the table of contents is open- Return type
bool
-
property
is_open¶ Return True when the table of contents is open.
- Returns
Truewhen the table of contents has height- Return type
bool
-
property
preface¶ Return the book’s preface CNX URL.
- Returns
the CNX URL for the book’s preface (the first link in the table of contents)
- Return type
str
-
class
pages.web.bookstore_suppliers module¶
The textbook suppliers page.
-
class
pages.web.bookstore_suppliers.Bookstore(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe print bookstore supplier page.
-
class
PriceList(page, root=None)[source]¶ Bases:
pypom.region.RegionA print copy price list.
-
property
country¶ Return the price list country.
- Returns
the country name for the pricing list
- Return type
str
-
property
url¶ Return the URL for the price list PDF.
- Returns
the source URL for the price list PDF document
- Return type
str
-
property
-
class
Provider(page, root=None)[source]¶ Bases:
pypom.region.RegionA print copy provider.
-
property
description¶ Return the bookstore company description.
- Returns
the company description
- Return type
str
-
property
has_candian_flag¶ Return True if the Canadian flag icon is displayed.
- Returns
Trueif the bookstore provider has a Canadian flag icon displayed- Return type
bool
-
property
name¶ Return the bookstore name.
- Returns
the bookstore company name
- Return type
str
-
property
url¶ Return the bookstore provider webpage URL.
- Returns
the URL for the bookstore provider
- Return type
str
-
property
-
URL_TEMPLATE= '/bookstore-suppliers'¶
-
property
description¶ Return the explanation text.
- Returns
the subheading text for either large or small displays
- Return type
str
-
is_displayed() → bool[source]¶ Return True when the bookstore providers are found.
- Returns
Truewhen the preferred and other providers are found- Return type
bool
-
property
other_providers¶ Access the non-preferred OpenStax book provider blocks.
- Returns
the list of other available bookstore provider blocks
- Return type
list(
Provider)
-
property
preferred_provider¶ Access the preferred OpenStax book provider block.
- Returns
the preferred bookstore provider box
- Return type
-
property
price_lists¶ Access the book price list by available countries.
- Returns
the list of book pricing by country
- Return type
list(
PriceList)
-
subjects_page() → pages.web.subjects.Subjects[source]¶ Click the ‘Subjects page’ link in the larger screen description.
- Returns
the book subjects page
- Return type
- :raises
WebException: if the link is unavailable because the user is viewing the page on a phone resolution
-
property
title¶ Return the page heading.
- Returns
the page heading
- Return type
str
-
class
pages.web.careers module¶
The OpenStax jobs board.
-
class
pages.web.careers.Careers(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe OpenStax jobs board.
-
class
Job(page, root=None)[source]¶ Bases:
pypom.region.RegionA job entry.
-
property
title¶ Return the job title.
- Returns
the job title
- Return type
str
-
property
url¶ Return the Rice Jobs posting URL.
- Returns
the Rice jobs board posting for the position
- Return type
str
-
property
-
URL_TEMPLATE= '/careers'¶
-
is_displayed() → bool[source]¶ Return True if the heading is displayed.
- Returns
Trueif the job list is populated- Return type
bool
-
property
job_list¶ Return the content within the open positions element.
- Returns
the job list content inner HTML
- Return type
str
-
property
jobs¶ Access the available jobs.
- Returns
the list of available OpenStax jobs
- Return type
list(
Job)
-
property
loaded¶ Return True when text content is found.
- Returns
Truewhen the text content is found and the async overlay is not- Return type
bool
-
class
pages.web.contact module¶
The Web contact form.
-
class
pages.web.contact.Contact(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe web contact form.
-
class
Form(page, root=None)[source]¶ Bases:
pypom.region.RegionThe Contact Us form.
-
ERROR= ' ~ span'¶
-
property
email¶ Return the email input.
-
property
errors¶ Return any form validation errors.
-
property
message¶ Return the message body text box.
-
property
name¶ Return the name input.
-
property
topic¶ Return the current message topic.
-
property
topic_drop_down¶ Return the contact message subject drop down menu.
-
-
URL_TEMPLATE= '/contact'¶
-
property
address¶ Return the OpenStax mailing address.
-
property
form¶ Access the contact form.
-
property
loaded¶ Return True when the form and sidebar text are found.
-
property
support¶ Return the user support link.
-
property
title¶ Return the page title.
-
class
-
class
pages.web.contact.ContactConfirmation(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe post-contact form submission confirmation page.
Return the subjects button.
-
property
loaded¶ Return True when the view subjects button is displayed.
-
property
title¶ Return the page title.
pages.web.donation module¶
pages.web.errata module¶
OpenStax book errata.
-
class
pages.web.errata.Errata(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe errata list for a particular book.
-
ALL= 0¶
-
ASCENDING= 'sortdir1'¶
-
CORRECTED= 3¶
-
DATE= 0¶
-
DECISION= 4¶
-
DESCENDING= 'sortdir-1'¶
-
class
ErrataItem(page, root=None)[source]¶ Bases:
pages.web.errata.ErrataBaseAn errata entry.
-
class
Filter(page, root=None)[source]¶ Bases:
pypom.region.RegionAn errata filter.
-
property
is_selected¶ Return True if the filter is currently selected.
-
property
value¶ Return the filter option name.
-
property
-
ID= 1¶
-
IN_REVIEW= 1¶
-
class
MobileErrataItem(page, root=None)[source]¶ Bases:
pages.web.errata.ErrataBaseAn errata entry for a mobile display.
-
REVIEWED= 2¶
-
SOURCE= 2¶
-
TYPE= 3¶
-
URL_TEMPLATE= '/errata/?book={book}'¶
-
property
correction_schedule¶ Return the tooltip.
-
property
errors¶ Access the individual errata entries.
-
property
filters¶ Access the errata filters.
-
property
loaded¶ Wait for the page loader and table data.
If there isn’t data (eg a new book), sleep 3 seconds then return.
-
property
order_options¶ Access the sort options.
-
property
title¶ Return the book title.
-
property
tooltip¶ Return the tooltip anchor.
-
-
class
pages.web.errata.ErrataBase(page, root=None)[source]¶ Bases:
pypom.region.RegionBase region for errata entries.
-
property
decision¶ Return the current errata decision.
-
property
errata_id¶ Return the errata ID number.
-
property
error_type¶ Return the errata type.
-
property
found_in¶ Return the location of the error.
-
property
source¶ Return the errata submission source.
-
property
submitted_on¶ Return the date the errata was submitted.
-
property
-
class
pages.web.errata.ErrataDetail(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseA detailed view for a single errata item.
-
URL_TEMPLATE= '/errata/{_id}'¶
-
property
completed_on¶ Return the date the errata review was completed.
-
property
description¶ Return the full issue description.
-
property
errata_id¶ Return the errata ID.
-
property
errata_list¶ Return the errata list link element.
-
property
error_type¶ Return the errata type.
-
property
found_in¶ Return the location where the issue was found.
-
property
in_review¶ Return the date the errata was submitted.
-
property
loaded¶ Return True when an errata ID is found.
-
property
reviewed_on¶ Return the date the errata was reviewed.
-
property
source¶ Return the errata source location.
-
property
status¶ Return the current status of the errata submission.
-
property
submitted_on¶ Return the date the errata was submitted.
-
property
title¶ Return the book title.
-
-
class
pages.web.errata.ErrataForm(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe errata submission form.
-
URL_TEMPLATE= '/errata/form?book={book}'¶
-
property
loaded¶ Return True when an errata form and book title are found.
-
property
subject¶ Return the currently selected book title.
-
pages.web.faq module¶
The frequently asked questions page.
-
class
pages.web.faq.FAQ(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe OpenStax frequently asked questions.
-
class
Question(page, root=None)[source]¶ Bases:
pypom.region.RegionA frequently asked question.
-
property
answer¶ Return the answer text.
-
property
answer_is_visible¶ Return True if the answer is visible.
-
property
question¶ Return the question text.
-
property
-
URL_TEMPLATE= '/faq'¶
-
property
heading¶ Return the heading text.
-
property
loaded¶ Return True if the hero banner is found.
-
property
questions¶ Return the list of frequently asked questions.
-
property
title¶ Return the page title.
-
class
pages.web.home module¶
OpenStax’s Web home page.
-
class
pages.web.home.Link(page, root=None)[source]¶ Bases:
pypom.region.RegionInternal information regions.
-
click()[source]¶ Go to the link destination.
Return a ‘Destination’ so the function will fail if a new link is added.
-
property
link¶ Return the link element.
-
property
text¶ Return the resource blurb.
-
property
title¶ Return the resource title.
-
-
class
pages.web.home.WebHome(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseOpenStax Web home page.
-
class
BookBanners(page, root=None)[source]¶ Bases:
pypom.region.RegionThe banner carousel.
-
class
Banner(page, root=None)[source]¶ Bases:
pypom.region.RegionAn individual banner.
-
click()[source]¶ Go to the banner link destination.
Return a ‘Destination’ so the function will fail if a new banner link is added.
-
property
destination¶ Return the destination URL.
-
property
image¶ Return the image file name.
Retrieve the style for the background image. Extract the CSS URL using a regular expression. Strip off the CSS URL delimiter. Split the URL and return the filename.
-
-
class
Dot(page, root=None)[source]¶ Bases:
pypom.region.RegionAn individual sellection button.
-
property
is_active¶ Return True if the banner’s dot is selected.
-
property
Access the banner.
-
property
dots¶ Access the banner dot buttons.
-
class
-
class
Dialog(page, root=None)[source]¶ Bases:
pypom.region.RegionThe Privacy and Cookies dialog box pop up.
-
property
content¶ Return the dialog box text content.
- Returns
the Privacy and Cookies dialog box text content
- Return type
str
-
displayed() → bool[source]¶ Return True if the dialog box is displayed.
- Returns
Trueif the dialog box is displayed- Return type
bool
-
got_it() → pages.web.home.WebHome[source]¶ Click the ‘Got it!’ button.
- Returns
the home page
- Return type
-
privacy_policy() → pages.web.legal.PrivacyPolicy[source]¶ Click on the privacy policy link.
- Returns
the privacy policy page
- Return type
-
property
title¶ Return the dialog box title.
- Returns
the Privacy and Cookies dialog box title
- Return type
str
-
property
-
class
Education(page, root=None)[source]¶ Bases:
pypom.region.RegionEducation and page links.
-
property
box_one¶ Return element one.
-
property
box_two¶ Return element two.
-
property
links¶ Access the educational links.
-
property
quote¶ Return the quote text.
-
property
student¶ Return the student image element.
-
property
-
class
Information(page, root=None)[source]¶ Bases:
pypom.region.RegionInformation buckets.
-
class
Bucket(page, root=None)[source]¶ Bases:
pages.web.home.LinkIndividual information boxes.
-
property
has_image¶ Return True if the box has an image.
-
property
-
property
box¶ Access the individual buckets.
-
class
-
class
Quotes(page, root=None)[source]¶ Bases:
pypom.region.RegionQuotes and page links.
-
class
Quote(page, root=None)[source]¶ Bases:
pypom.region.RegionA single quote box.
Return the button or link element.
-
click()[source]¶ Go to the link destination.
Return a ‘Destination’ so the function will fail if a new quote is added.
Return True if the quote box has a link or button.
-
property
has_image¶ Return True if the quote box has a background image.
-
property
image¶ Return the image element.
-
property
text¶ Return the quote text.
-
property
quotes¶ Access the individual quotes.
-
class
-
URL_TEMPLATE= ''¶
-
property
carousel¶ Access the book banner carousel.
-
property
education¶ Access the education section and related links.
-
property
information¶ Access the informational links.
-
property
loaded¶ Return True when the banner carousel and navs are displayed.
-
property
privacy¶ Access the privacy and cookies notice.
- Returns
the privacy and cookies dialog notice
- Return type
-
property
quotes¶ Access the quote buckets.
-
class
pages.web.impact module¶
The OpenStax textbook impact webpage.
-
class
pages.web.impact.Impact(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe Impact page.
-
class
StatBox(page, root=None)[source]¶ Bases:
pypom.region.RegionA student use stat box.
-
property
description¶ Return the number’s description.
- Returns
the stat number’s description/explanation
- Return type
str
-
property
number¶ Return the stat number.
- Returns
the textbook use stat number
- Return type
str
-
property
-
class
Testimonial(page, root=None)[source]¶ Bases:
pypom.region.RegionA user testimonial box.
-
property
content¶ Return the testimonial quote.
- Returns
the textbook use testimonial text quote
- Return type
str
-
property
-
business_textbooks() → pages.web.subjects.Subjects[source]¶ Click the ‘business textbooks’ link.
- Returns
the subjects page displaying the business books
- Return type
-
property
description¶ Return the page description.
- Returns
the impact page description
- Return type
str
-
property
disruption¶ Return the positive disruption to textbook prices statement.
- Returns
the price disruption statement
- Return type
str
-
property
doerr_statement¶ Return the Ann Doerr education revolution statement.
- Returns
the Ann Doerr revolution in education letter
- Return type
str
-
explore_our_interactive_map() → pages.web.global_reach.GlobalReach[source]¶ Click the interactive map link.
- Returns
the global reach page
- Return type
GlobalReach
-
give_today(use_banner_button: bool = True) → pages.rice.riceconnect.RiceConnect[source]¶ Click a ‘Give today!’ button.
- Parameters
use_banner_button (bool) – (optional) click the banner donation button when
Trueor the Give section button whenFalse- Returns
the RiceConnect OpenStax donation page
- Return type
RiceConnect
-
property
giving¶ Return the donation request.
- Returns
the donation and support request
- Return type
str
-
property
heading¶ Return the page heading.
- Returns
the impact page heading statement
- Return type
str
-
is_displayed() → bool[source]¶ Return True if the impact page title and description are displayed.
- Returns
Truewhen the impact page title and description are displayed- Return type
bool
-
learn_more_about_openstax_tutor_beta() → pages.web.tutor.TutorMarketing[source]¶ Click the ‘Learn more about OpenStax Tutor Beta’ link.
- Returns
the OpenStax Tutor Beta marketing page
- Return type
-
property
loaded¶ Return True when the impact page heading is found.
- Returns
Truewhen the impact page heading is found- Return type
bool
-
property
looking_ahead¶ Return the OpenStax ecosystem outlook statement.
- Returns
the planned direction statement for the OpenStax ecosystem
- Return type
str
-
property
partnerships¶ Return the textbook ecosystem partnerships statement.
- Returns
the textbook ecosystem partnerships statement
- Return type
str
-
property
philanthropic_partners¶ Return the philanthropic partners statement and quote.
- Returns
the philanthropic thank you and Bob Maxfield’s quote
- Return type
str
-
see_a_full_list_of_our_partners() → pages.web.partners.Partners[source]¶ Click the partnership link.
- Returns
the OpenStax ecosystem partners page
- Return type
-
property
student_reach¶ Return the student impact statement.
- Returns
the student reach and impact statement
- Return type
str
-
property
student_reach_stats¶ Access the student impact number boxes.
- Returns
the list of student impact boxes
- Return type
list(
StatBox)
-
property
testimonials¶ Access the user testimonial quote boxes.
- Returns
the list of user testimonial quote boxes
- Return type
list(
Testimonial)
-
property
textbook_use¶ Return the global textbook use statement.
- Returns
the global use of OpenStax textbooks statement
- Return type
str
-
property
tutor¶ Return the OpenStax Tutor Beta overview statement.
- Returns
the OpenStax Tutor Beta overview statement
- Return type
str
-
property
vision_statement¶ Return the founding vision statement.
- Returns
the founding vision statement
- Return type
str
-
class
pages.web.interest module¶
The interest form page.
-
class
pages.web.interest.Interest(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.adoption.AdoptionThe book interest form.
-
class
Form(page, root=None)[source]¶ Bases:
pages.web.adoption.FormThe interest form.
-
property
selected_books¶ Return a list of selected book elements.
-
property
selection¶ Return a list of selected books.
-
property
students¶ Return the semester student count element.
-
property
using_error¶ Return the student section error message.
-
property
-
URL_TEMPLATE= '/interest'¶
-
submit_interest(user_type, first, last, email, phone, school, books, students, additional_resources, heard_on, tech_providers=None, other_provider=None)[source]¶ Fill out and submit the interest form.
- Args:
- user_type (str): the user’s role
Web.STUDENT, Web.INSTRUCTOR, Web.ADMINISTRATOR, Web.LIBRARIAN, Web.DESIGNER, Web.HOMESCHOOL, Web.ADJUNCT, or Web.OTHER
first (str): the user’s first name last (str): the user’s last name email (str): the user’s email address phone (str): the user’s telephone number school (str): the user’s school affiliation books (list): a list of book short names students (int): the number of students taught in a semester
number must be greater than or equal to one
- additional_resources (list): a list of additional resource options
Web.HOMEWORK, Web.COURSEWARE, and/or Web.TOOLS
- heard_on (list): a list of marketing sources
Web.BY_WEB_SEARCH, Web.BY_COLLEAGUE, Web.AT_CONFERENCE, Web.BY_EMAIL, Web.BY_FACEBOOK, Web.BY_TWITTER, Web.BY_WEBINAR, Web.BY_PARTNER
- tech_providers (list): a list of tech partners user use
[Web.TechProviders.<provider>]
- other_providers (str): a string of unlisted providers to be used
when Web.TechProviders.OTHER is in tech_providers
-
class
-
class
pages.web.interest.InterestConfirmation(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.adoption.AdoptionConfirmationThe interest confirmation page.
-
URL_TEMPLATE= '/interest-confirmation'¶
-
property
response¶ Return the response text.
-
property
subjects¶ Return the ‘Back to the books’ link.
-
pages.web.legal module¶
The legal / intellectual property frequently asked questions page.
-
class
pages.web.legal.LegalBase(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe base page for the legal document pages.
-
property
content¶ Return the content wrapper.
-
property
heading¶ Return the heading.
-
property
loaded¶ Return True when the content is available.
-
property
text¶ Return the body text.
-
property
title¶ Return the heading text.
-
property
-
class
pages.web.legal.License(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.legal.LegalBaseThe OpenStax.org licensing overview page.
-
class
Question(question)[source]¶ Bases:
objectA question and answer pair.
-
property
answer¶ Return the answer text.
-
property
question¶ Return the question text.
-
property
-
URL_TEMPLATE= '/license'¶
-
property
attribution_license¶ Return the Attribution 4.0 license link.
-
property
creative_commons¶ Return the Creative Commons link.
-
property
questions¶ Access the questions and their answers.
-
class
-
class
pages.web.legal.PrivacyPolicy(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.legal.LegalBaseThe OpenStax.org terms of use.
-
URL_TEMPLATE= '/privacy-policy'¶
-
property
gdpr¶ Return the GDPR link.
-
property
privacy_content¶ Return the privacy policy content.
-
property
sections¶ Access the section headings.
-
-
class
pages.web.legal.Terms(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.legal.LegalBaseThe OpenStax.org terms of use.
-
URL_TEMPLATE= '/tos'¶
-
pages.web.newsletter module¶
The OpenStax marketing newsletter signup form.
Bases:
pages.web.base.WebBaseThe newsletter signup form.
Return True if the form is displayed.
Return True when the form is displayed.
pages.web.partners module¶
OpenStax Partners.
-
class
pages.web.partners.Institutional(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe OpenStax Institutional Partners page.
-
URL_TEMPLATE= '/institutional-partnership'¶
-
is_displayed() → bool[source]¶ Return True when the page is displayed.
- Returns
Truewhen the page is loaded and the title is found- Return type
bool
-
property
loaded¶ Return True when the page is loaded.
- Returns
Truewhen the async hide class is not found, the template URL is in use, and the title banner is found- Return type
bool
-
-
class
pages.web.partners.Partners(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe OpenStax Partners page.
-
class
Company(page, root=None)[source]¶ Bases:
pypom.region.RegionA company logo and summary link.
-
property
link¶ Return the anchor link to the company’s summary.
-
property
logo¶ Return the company logo.
-
property
name¶ Return the company name.
-
property
-
class
Summary(page, root=None)[source]¶ Bases:
pypom.region.RegionAn OpenStax Ally company summary.
-
property
availability¶ Return the links to the resources available for an ally.
-
property
description¶ Return the full company description.
-
property
description_segments¶ Return the pared list of description paragraphs.
-
property
header¶ Return the company name object.
-
property
name¶ Return the company name.
-
property
return_to_top_link¶ Return the ‘Return to top’ link element.
-
property
-
URL_TEMPLATE= '/partners'¶
Return the page heading object.
-
property
companies¶ Access the OpenStax Ally companies by their logos.
-
property
current_filter¶ Return the current filter.
-
property
description¶ Return the subheading.
-
property
filter¶ Return the currently selected filter button.
Access the subject filter buttons.
-
property
loaded¶ Return True if the title is set and images are visible.
-
property
logo¶ Return the OpenStax Ally logo.
-
property
logo_description¶ Return the ally logo meaning.
-
property
summaries¶ Access the OpenStax Ally company summaries.
-
property
title¶ Return the banner text.
-
class
pages.web.press module¶
The press and marketing page.
-
class
pages.web.press.Press(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe press and marketing page.
-
class
Contact(page, root=None)[source]¶ Bases:
pypom.region.RegionAn OpenStax MarComm point of contact.
-
property
email¶ Return the contact email address.
-
property
name¶ Return the contact person’s name.
-
property
phone¶ Return the contact telephone number.
-
property
-
class
Expert(page, root=None)[source]¶ Bases:
pypom.region.RegionAn OpenStax expert.
-
property
bio¶ Return the expert’s short biography.
-
property
has_portrait¶ Return True if the portrait exists.
-
property
name¶ Return the expert’s name.
-
property
portrait¶ Return the expert’s picture.
-
property
role¶ Return the expert’s role or job description.
-
property
-
FIRST= ' .nav-buttons div:first-child'¶
-
HEADLINE= ' .headline-container:not([hidden]) .press-excerpt'¶
-
LAST= ' .nav-buttons div:last-child'¶
-
MAIN= '.main-body '¶
-
MOBILE= '.mobile-view '¶
-
class
Mention(page, root=None)[source]¶ Bases:
pypom.region.RegionA news article mentioning OpenStax.
-
property
date¶ Return a timezone-aware date of publication.
-
property
headline¶ Return the article headline.
-
property
headline_element¶ Return the headline element.
-
property
logo¶ Return the logo.
-
property
source¶ Return the source organization name.
-
property
url¶ Return the article URL.
-
property
-
class
Social(page, root=None)[source]¶ Bases:
pypom.region.RegionA social media option.
-
property
name¶ Return the Social media company name.
-
property
select¶ Go to the OpenStax social media page.
-
property
url¶ Return the link URL.
-
property
url_name¶ Return the case-lowered company name found in the URL.
-
property
-
URL_TEMPLATE= '/press'¶
-
property
contact¶ Return the press contact information.
Return the currently selected mobile menu option.
-
property
experts¶ Access the OpenStax experts cards.
-
property
loaded¶ Return True when the four root elements are found.
-
property
mentions¶ Access the news articles mentioning OpenStax.
Return the list of selection options.
-
property
mission_displayed¶ Return True if the mission statements are displayed.
-
property
mission_statements¶ Return the list of mission statements.
-
property
press_kit¶ Return the press kit download button.
-
property
releases¶ Access the press releases.
Access the OpenStax social pages.
-
property
title¶ Return the title.
-
property
viewing_fewer_releases¶ Return True if viewing the top two press releases.
-
class
-
class
pages.web.press.PressRelease(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseA press release page.
-
URL_TEMPLATE= '/press/{article}'¶
Return the press release author.
-
property
content¶ Return the press release content.
-
property
date¶ Return a timezone-aware date of publication.
-
property
headline¶ Return the headline text.
-
property
is_an_article¶ Return True if the page is a press release article.
-
property
loaded¶ Return True when the press release text is displayed.
-
property
other_releases¶ Access the press releases.
-
property
viewing_fewer_releases¶ Return True if viewing the top two press releases.
-
-
class
pages.web.press.Release(page, root=None)[source]¶ Bases:
pypom.region.RegionAn OpenStax press release snippet.
Return the name from the byline.
-
property
byline¶ Return the byline text.
-
property
continue_reading¶ Return the ‘Continue reading’ link.
-
property
date¶ Return a timezone-aware date of release.
-
property
excerpt¶ Return the excerpt.
-
property
headline¶ Return the press release headline.
pages.web.research module¶
The Web research overview page.
-
class
pages.web.research.Research(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe researchers page.
-
ALUMNI_FIRST= ':first-child .entry'¶
-
ALUMNI_LAST= ':last-child .entry'¶
-
class
Bar(page, root=None)[source]¶ Bases:
pypom.region.RegionA group bar for a phone view accordion menu.
-
property
is_open¶ Return True if the accordion region is open.
-
property
name¶ Return the bar region group name.
-
property
toggle_bar¶ Return the toggle bar element.
-
property
-
class
Card(page, root=None)[source]¶ Bases:
pypom.region.RegionA current research project.
-
property
summary¶ Return the research summary.
-
property
topic¶ Return the research project topic.
-
property
-
class
Entry(page, root=None)[source]¶ Bases:
pypom.region.RegionAn alumni researcher or external collaborator.
-
property
is_visible¶ Return True if the person’s card is in the viewport.
-
property
name¶ Return the member’s name.
-
property
role¶ Return the member’s role or affiliation.
-
property
-
FULL= 'tab-content'¶
-
MEMBER= ' .members-tab .card'¶
-
PHONE= '.accordion-item'¶
-
class
Person(page, root=None)[source]¶ Bases:
pages.web.research.EntryA current member of the research team.
-
property
headshot¶ Return the image element.
-
property
-
class
Publication(page, root=None)[source]¶ Bases:
pypom.region.RegionA research publication.
Return the authors from the headline.
-
property
document¶ Return the publication PDF URL.
-
property
headline¶ Return the headline text.
-
property
summary¶ Return the publication summary.
-
property
title¶ Return the publication title from the headline.
-
property
year¶ Return the publication year from the headline.
-
class
Tab(page, root=None)[source]¶ Bases:
pypom.region.RegionA group tab view.
-
property
is_open¶ Return True if the tab is currently selected.
-
property
name¶ Return the tab group name.
-
property
-
URL_TEMPLATE= '/research'¶
-
property
alumni¶ Access the research alumni cards.
Return the banner image elements.
-
property
bars¶ Access the phone view group bars.
-
property
external¶ Access the external collaborator cards.
-
property
loaded¶ Override the base loader.
-
property
mission¶ Return the mission statement body.
-
property
projects¶ Access the research project cards.
-
property
publications¶ Access the published research paper overviews.
-
property
tabs¶ Access the research team display tabs.
-
property
team¶ Access the current research team member cards.
-
property
title¶ Return the banner title.
-
pages.web.subjects module¶
The Subjects page.
-
class
pages.web.subjects.Book(page, root=None)[source]¶ Bases:
pypom.region.RegionA single book title.
-
property
image¶ Return the image element.
-
property
image_source¶ Return the image source URL.
-
property
language¶ Return the book language.
-
property
title¶ Return the book title.
-
property
url¶ Return the book URL.
-
property
url_append¶ Return the last part of the URL.
-
property
-
class
pages.web.subjects.Subjects(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe subjects page.
-
AUTHORS= 0¶
-
class
About(page, root=None)[source]¶ Bases:
pypom.region.RegionAn About Our Textbooks blurb.
-
property
blurb¶ Return the blurb text.
-
property
title¶ Return the blurb title.
-
property
-
class
Category(page, root=None)[source]¶ Bases:
pypom.region.RegionSubject category information.
-
property
books¶ Return category books.
-
property
is_visible¶ Return True if the category is displayed.
-
property
section¶ Return the category title.
-
property
-
class
Filter(page, root=None)[source]¶ Bases:
pypom.region.RegionSubject filters.
-
property
is_selected¶ Return True if the filter is active.
-
property
subject¶ Return the filter subject.
-
property
value¶ Return the category value.
-
property
-
PEER_REVIEWED= 2¶
-
SEQUENCE= 1¶
-
URL_TEMPLATE= '/subjects'¶
-
property
about¶ Return the about blurb texts.
-
property
ap¶ Return the subjects filtered by the AP titles.
-
property
ap_books¶ Select active AP books.
-
property
available_books¶ Select active books.
Select active books available through Bookshare.
-
property
business¶ Return the subjects filtered by the business titles.
-
property
business_books¶ Select active business books.
-
category_xpath= '//div[h2[text()="{subject}"]]'¶
-
property
college_success¶ Return the subjects filtered by the College Success titles.
-
property
comp_copy¶ Select the current editions of each book.
-
property
current_books¶ Select the current editions of each book.
-
property
essentials¶ Return the subjects filtered by the essentials titles.
-
property
essentials_books¶ Select active essentials books.
-
property
filters¶ Return the available filters.
-
property
humanities¶ Return the subjects filtered by the humanities titles.
-
property
humanities_books¶ Select active humanities books.
-
is_filtered_by(subject_filter)[source]¶ Return True if the books are filtered by the submitted subject.
-
property
itunes_books¶ Select active books with an iBook eddition available.
-
property
kindle_books¶ Select active books with a Kindle edition available.
-
property
loaded¶ Override the base loader.
-
property
locked_instructor¶ Select active books with locked instructor resources.
-
property
locked_student¶ Select active books with locked student resources.
-
property
math¶ Return the subjects filtered by math titles.
-
property
math_books¶ Select active math books.
-
property
old_book_editions¶ Select the books with a newer editions available.
-
property
openstax_books¶ Select active books while excluding Polish versions.
-
property
polish_books¶ Select active books in Polish.
-
property
print_books¶ Select the books with a current print edition available.
-
property
science¶ Return the subjects filtered by the science titles.
-
property
science_books¶ Select active science books.
-
select_book(book_title)[source]¶ Return the book page for a specific title.
- Parameters
book_title (str) – the full book title found in the alt field
- Returns
the book page for the selected title
- Return type
-
select_random_book(_from='openstax', filter_current=False)[source]¶ Return a random book from the active list.
Return the subjects filtered by the social sciences titles.
Select active social science books.
-
property
total_filters¶ Return the number the filter options available.
-
property
unlocked_instructor¶ Select active books with unlocked instructor resources.
-
property
unlocked_student¶ Select active books with unlocked student resources.
-
pages.web.supporters module¶
The foundation and corporate supporters page.
-
class
pages.web.supporters.Supporters(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe foundation and corporate supporters page.
-
URL_TEMPLATE= '/foundation'¶
-
property
blurb¶ Return the subheading text.
-
property
loaded¶ Return whether the hero banner is found.
-
property
supporters¶ Return the list of funders.
-
property
title¶ Return the banner title.
-
pages.web.team module¶
The OpenStax team and advisor page.
-
class
pages.web.team.Individual(page, root=None)[source]¶ Bases:
pypom.region.RegionA base class for members of the OpenStax team.
-
property
bio¶ Return the advisor’s biography.
-
property
is_visible¶ Return True if the person’s card is in the viewport.
-
property
name¶ Return the advisor’s name.
-
property
-
class
pages.web.team.Team(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe OpenStax team and advisors page.
-
ADVISOR= ' .people-tab.inline-bios .card:not(.bio)'¶
-
class
Advisor(page, root=None)[source]¶ Bases:
pages.web.team.IndividualA strategic advisor bio.
-
class
Bar(page, root=None)[source]¶ Bases:
pypom.region.RegionA group bar for a phone view accordion menu.
-
property
is_open¶ Return True if the accordion region is open.
-
property
name¶ Return the bar region group name.
-
property
toggle_bar¶ Return the toggle bar element.
-
property
-
FAB= ' '¶
-
FULL= 'tab-content'¶
-
class
FacultyAdvisor(page, root=None)[source]¶ Bases:
pages.web.team.IndividualA faculty advisory board member bio.
-
PERSON= ' .people-tab:not(.inline-bios) .card:not(.bio)'¶
-
PHONE= 'accordion-region'¶
-
class
Person(page, root=None)[source]¶ Bases:
pages.web.team.IndividualA staff member bio.
-
property
bio¶ Return the person’s biography blurb.
Use a script because the bio is inserted inline with the cards and doesn’t fall within the card tree.
-
property
bio_visible¶ Return True if the bio is currently open.
-
property
has_bio¶ Return True if the person has an associated biography.
-
property
headshot¶ Return the headshot image.
-
property
role¶ Return the person’s role at OpenStax.
-
property
-
class
Tab(page, root=None)[source]¶ Bases:
pypom.region.RegionA group tab view.
-
property
is_open¶ Return True if the tab is currently selected.
-
property
name¶ Return the tab group name.
-
property
-
URL_TEMPLATE= '/team'¶
-
property
advisors¶ Access the strategic advisors bio cards.
Return the banner image element.
-
property
bars¶ Access the phone view group bars.
-
property
fab¶ Access the faculty adisory board bio cards.
-
property
loaded¶ Return True when banner is visible.
-
property
people¶ Access the OpenStax staff bio cards.
-
property
subheading¶ Return the subheading text.
-
property
tabs¶ Access the group tabs.
-
property
title¶ Return the page title.
-
pages.web.technology module¶
The technology page.
-
class
pages.web.technology.Technology(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.base.WebBaseThe technology options page.
-
class
Steps(page, root=None)[source]¶ Bases:
pypom.region.RegionResource access steps.
-
BOOK= '[data-value={book}]'¶
-
INSTRUCTOR= '.step:nth-child(2) '¶
-
TECHNOLOGY= '.step:last-child '¶
-
property
book_selected¶ Return the resource link border stylings.
-
property
title¶ Return the resource heading text.
-
property
title_box¶ Return the resource heading element.
-
-
class
Tutor(page, root=None)[source]¶ Bases:
pypom.region.RegionTutor information.
-
property
description¶ Return the description text.
-
property
heading¶ Return the heading text.
-
property
title¶ Return the section banner title.
-
property
-
URL_TEMPLATE= '/technology'¶
-
property
description¶ Return the page subheading text.
-
property
loaded¶ Override the base loader.
-
property
resources¶ Access the Steps section.
-
property
title¶ Return the page title.
-
property
tutor¶ Access the OpenStax Tutor beta section.
-
class
pages.web.tutor module¶
The OpenStax Tutor Beta marketing page.
-
class
pages.web.tutor.Section(page, root=None)[source]¶ Bases:
pypom.region.RegionA marketing page section.
-
property
description¶ Return the section description.
-
property
heading¶ Return the heading text.
-
property
section¶ Return the section header element.
-
property
-
class
pages.web.tutor.TutorMarketing(driver, base_url=None, timeout=60, **url_kwargs)[source]¶ Bases:
pages.web.home.WebHomeThe Tutor marketing page.
-
class
FAQ(page, root=None)[source]¶ Bases:
pages.web.tutor.SectionThe ‘Frequently Asked Questions’ section.
-
class
Quetion(page, root=None)[source]¶ Bases:
pypom.region.RegionA frequently asked question.
-
property
answer¶ Return the answer if the answer is visible.
-
property
is_open¶ Return True if the answer is visible.
-
property
question¶ Return the question text.
-
property
-
property
description¶ Override the description field.
-
property
questions¶ Access the individual questions.
-
class
-
class
FeatureMatrix(page, root=None)[source]¶ Bases:
pages.web.tutor.SectionThe available features list.
-
property
features¶ Return the current features.
-
property
new_features¶ Return the list of new features.
-
property
planned_features¶ Return the list of planned features.
-
property
-
class
HowItWorks(page, root=None)[source]¶ Bases:
pages.web.tutor.SectionThe ‘How It Works’ section.
-
class
Box(page, root=None)[source]¶ Bases:
pypom.region.RegionA How It Works blurb box.
-
property
description¶ Return the box description.
-
property
icon¶ Return the icon element.
-
property
title¶ Return the box title.
-
property
-
property
boxes¶ Access the blurb boxes.
-
property
how_it_works¶ Return the subheading text.
-
property
subheading¶ Return the subheading element.
-
class
-
class
LearnMore(page, root=None)[source]¶ Bases:
pages.web.tutor.SectionThe ‘Learn More’ section.
-
class
Button(page, root=None)[source]¶ Bases:
pypom.region.RegionA Learn More button box.
Return the button link.
-
property
description¶ Return the button description.
Return the button boxes.
-
class
-
class
NewFrontier(page, root=None)[source]¶ Bases:
pages.web.tutor.SectionThe ‘New Frontier’ section.
-
property
logo¶ Return the OpenStax Tutor beta logo.
-
property
subheading¶ Return the subheading text.
-
property
-
class
Science(page, root=None)[source]¶ Bases:
pages.web.tutor.SectionThe ‘Science behind OpenStax Tutor Beta’ section.
-
property
particles¶ Return the flying particles canvas.
-
property
-
class
Sidebar(page, root=None)[source]¶ Bases:
pypom.region.RegionThe marketing page sidebar navigation.
Return the navigation dots.
Bases:
pypom.region.RegionThe marketing page sticky footer.
Bases:
pypom.region.RegionA sticky footer button.
Return the button link.
Return the button description.
Access the footer buttons.
Go to Tutor.
Return True if the footer is visible.
Go to the webinar blog post.
-
URL_TEMPLATE= '/openstax-tutor'¶
-
class
WhatStudentsGet(page, root=None)[source]¶ Bases:
pages.web.tutor.SectionThe ‘What Students Get’ section.
-
class
Carousel(page, root=None)[source]¶ Bases:
pypom.region.RegionThe student view introductory videos and images.
-
RECT= 'return arguments[0].getBoundingClientRect();'¶
-
SET_BAR= 'arguments[0].scrollLeft = {left}'¶
-
property
description¶ Return the current image description.
-
property
media_ready¶ Return True if the current media is ready.
-
property
option_container¶ Return the option parent element.
-
property
options¶ Return the list of available info buttons.
-
property
viewport¶ Return the image viewer.
-
-
property
tutor¶ Access the student view intro carousel.
-
class
-
class
WhereMoneyGoes(page, root=None)[source]¶ Bases:
pages.web.tutor.SectionThe ‘Where the Money Goes’ section.
-
property
breakdown¶ Return the cost breakdown text.
-
property
breakdown_image¶ Return the breakdown image element for any screen size.
-
property
-
property
faq¶ Access the frequently asked questions section.
-
property
features¶ Access the ‘Feature Matrix’ section.
-
property
how_it_works¶ Access the ‘How It Works’ section.
-
property
introduction¶ Access the ‘New Frontier’ section.
-
property
learn_more¶ Access the ‘Learn More’ section.
-
property
loaded¶ Override the base loader.
Access the marketing page sticky footer.
-
property
science¶ Access the ‘Science’ section.
-
property
sections¶ Return a list of available sections.
Access the sidebar navigation.
-
property
what_students_get¶ Access the ‘What Students Get’ section.
-
property
where_money_goes¶ Access the ‘Where Money Goes’ section.
-
class