Beispiel #1
0
 def view_help_articles(self):
     """Go to the Salesforce help site."""
     link = self.find_element(*self._help_locator)
     url = link.get_attribute('href')
     Utility.switch_to(self.driver, element=link)
     from pages.salesforce.home import Salesforce
     return go_to_external_(Salesforce(self.driver), url)
Beispiel #2
0
 def visit_the_support_center(self):
     """Click on the support link."""
     link = self.support
     url = link.get_attribute('href')
     Utility.switch_to(self.driver, self._support_locator,
                       force_js_click=self.is_safari)
     from pages.salesforce.home import Salesforce
     return go_to_external_(Salesforce(self.driver), url)
Beispiel #3
0
 def visit_support(self):
     """Click the 'support page' link."""
     link = self.wait.until(
         lambda _: self.find_element(*self._support_locator))
     url = link.get_attribute('href')
     Utility.switch_to(self.driver, element=link)
     from pages.salesforce.home import Salesforce
     return go_to_external_(Salesforce(self.driver), url)
Beispiel #4
0
        def contact_us(self) -> Salesforce:
            """Click the 'Contact us' link.

            :return: the Salesforce support page
            :rtype: :py:class:`~pages.salesforce.home.Salesforce`

            """
            link = self.find_element(*self._contact_support_link_locator)
            Utility.click_option(self.driver, element=link)
            return go_to_(Salesforce(self.driver))
Beispiel #5
0
            def how_do_i_integrate_with(self):
                """Access the Salesforce LMS integration walkthrough.

                :return: the LMS integration walkthrough on Salesforce
                :rtype: :py:class:`~pages.salesforce.home.Salesforce`

                """
                link = self.find_element(*self._integration_help_locator)
                Utility.switch_to(self.driver, element=link)
                from pages.salesforce.home import Salesforce
                return go_to_(Salesforce(self.driver))
Beispiel #6
0
        def view_help_articles(self) -> Salesforce:
            """Click on the Help link to view Salesforce articles.

            :return: the OpenStax knowledge base webpage
            :rtype: :py:class:`~pages.salesforce.home.Salesforce`

            """
            link = self.find_element(*self._help_link_locator)
            url = link.get_attribute('href')
            Utility.switch_to(self.driver, element=link)
            return go_to_external_(Salesforce(self.driver), url)
Beispiel #7
0
        def get_help(self):
            """Click on the 'Get help >' link.

            :return: the OpenStax knowledge base webpage in a new tab
            :rtype: :py:class:`~pages.salesforce.home.Salesforce`

            """
            link = self.find_element(*self._help_link_locator)
            Utility.switch_to(self.driver, element=link)
            from pages.salesforce.home import Salesforce
            return go_to_(Salesforce(self.driver))
Beispiel #8
0
        def support_center(self) -> Page:
            """Go to the OpenStax Salesforce support site.

            :return: the Salesforce knowledge base in a new tab
            :rtype: :py:class:`~pages.salesforce.home.Salesforce`

            """
            link = self.find_element(*self._support_center_locator)
            Utility.switch_to(self.driver, element=link)
            from pages.salesforce.home import Salesforce
            return go_to_external_(
                Salesforce(self.driver, base_url=Web.SALESFORCE_SUPPORT))
Beispiel #9
0
def test_at_salesforce(selenium):
    """Return True if at the OpenStax Salesforce help webpage."""
    page = Salesforce(selenium).open()
    assert (page.at_salesforce), 'Not at the Salesforce help page'
Beispiel #10
0
 def view_support(self):
     """Click the 'Support page' link."""
     support_link = self.find_element(*self._support_locator)
     Utility.switch_to(self.driver, element=support_link)
     from pages.salesforce.home import Salesforce
     return go_to_(Salesforce(self.driver))
Beispiel #11
0
 def view_salesforce_contact(self):
     """View the contact information on Salesforce."""
     contact = self.find_element(*self._view_on_salesforce_locator)
     Utility.click_option(self.driver, element=contact)
     from pages.salesforce.home import Salesforce
     return go_to_(Salesforce(self.driver))