コード例 #1
0
ファイル: jmx_test_page.py プロジェクト: vanillasky59/bza
    def upload(self, file_path):
        elem = BasePage.find_element(self, By.CSS_SELECTOR, 'div.files-container input')
        get_driver(self).execute_script("arguments[0].className = 'file-input';", elem)
        get_driver(self).execute_script("arguments[0].style.visibility = 'visible';", elem)
        elem.send_keys([file_path])

        assert BasePage.is_element_present(self, By.CSS_SELECTOR, self.delete_button), 'Failed to upload file'
コード例 #2
0
ファイル: http_test_page.py プロジェクト: vanillasky59/bza
    def verify_more_options_is_opened(self, index=None, opened=None):
        if index is None:
            index = 1
        if opened is None:
            opened = True

        present = BasePage.is_element_present(self, By.CSS_SELECTOR, self.row_number_prefix.format(index) +
                                              self.add_header_button)
        return present if opened else not present