コード例 #1
0
    def __init__(self, driver: WebDriver):
        self.driver = driver

        # Wait for the cases list to load before interacting with the page
        if functions.element_with_id_exists(self.driver, "link-queue"):
            WebDriverWait(driver, 10).until(
                expected_conditions.visibility_of_element_located(
                    (By.ID, "text-case-count")))

        # The case header is sticky and can often overlay elements preventing clicks,
        # therefore disable the stickyness of the header when running tests
        if functions.element_with_id_exists(self.driver, "app-header"):
            self.driver.execute_script(
                "document.getElementById('app-header').style.position = 'relative';"
            )
コード例 #2
0
 def reissue_button_is_present(self):
     return element_with_id_exists(self.driver, self.REISSUE_BUTTON_ID)
コード例 #3
0
 def try_click_sign_in_button(self):
     if functions.element_with_id_exists(self.driver,
                                         self.BUTTON_SIGN_IN_ID):
         self.driver.find_element_by_id(self.BUTTON_SIGN_IN_ID).click()
コード例 #4
0
 def is_licence_document_present(self):
     return element_with_id_exists(self.driver, self.LICENCE_DOCUMENT_DOWNLOAD_ID)
コード例 #5
0
 def does_remove_additional_document_exist(self, driver):
     return element_with_id_exists(driver, self.REMOVE_ADDITIONAL_DOCUMENT_LINK)
コード例 #6
0
def default_addressee(driver):
    if element_with_id_exists(driver, "addressee-applicant"):
        functions.click_submit(driver)
コード例 #7
0
 def decision_row_exists(self, decision_key):
     return element_with_id_exists(self.driver, self.DECISION_ROW_PARTIAL_ID + decision_key)
コード例 #8
0
def see_hmrc(driver, context):
    assert ApplicationPage(driver).get_type_of_case_from_page() == "HMRC Query"
    assert functions.element_with_id_exists(
        driver,
        ApplicationPage(driver).HMRC_GOODS_LOCATION)