Ejemplo n.º 1
0
 def upload_contact_file(self, file_path):
     self._driver.find_element(By.CSS_SELECTOR, 'input[type="file"]')\
         .send_keys(file_path)
     self._driver.find_element(By.LINK_TEXT, '导入').click()
     locator = (By.LINK_TEXT, '完成')
     WebDriverWait(self._driver, 10).until(EC.visibility_of_element_located(locator))
     self._driver.find_element(*locator).click()
     return ContactsPage(self._driver)
Ejemplo n.º 2
0
 def class_setup(self):
     self.ts = TestStatus(self.driver)
     self.lp = LoginPage(self.driver)
     self.nav = NavigatePage(self.driver)
     self.sup_info_fev = FindExistingValuePage(self.driver)
     self.sup_info_anv = SupplierInformationANV(self.driver)
     self.summary = SummaryPage(self.driver)
     self.id_info = IdentifyingInformationPage(self.driver)
     self.addr = AddressPage(self.driver)
     self.contacts = ContactsPage(self.driver)
     self.loc = LocationPage(self.driver)
     self.procurement = ProcurementOptionsWindow(self.driver)
     self.sup_xref = SupplierXrefWindow(self.driver)
Ejemplo n.º 3
0
def hook4test_contact():
    contact_page = ContactsPage()
    yield contact_page
    contact_page.close()
Ejemplo n.º 4
0
 def contacts(self):
     self._driver.find_element(By.ID, 'menu_contacts').click()
     return ContactsPage(self._driver)
Ejemplo n.º 5
0
 def goto_contacts_page(self):
     self.find_ele(self.__eles['tab_contacts']).click()
     return ContactsPage()
Ejemplo n.º 6
0
 def cancel(self):
     self._driver.find_elements(By.CSS_SELECTOR,
                                '.js_btn_cancel')[0].click()
     return ContactsPage(self._driver)
Ejemplo n.º 7
0
 def save(self, name, account, phone, gender='1'):
     self.input_member_info(name, account, phone, gender)
     self._driver.find_elements(By.CSS_SELECTOR, '.js_btn_save')[-1].click()
     return ContactsPage(self._driver)