def LogIN(self, username, password): # wait = WebDriverWait(self.w, 10, poll_frequency=1, # ignored_exceptions=[NoSuchElementException, # ElementNotVisibleException, # ElementNotSelectableException]) page = Locator(self.w) page.username_text = username print(Locator.username_text) page.password_text = password page.LogIn_button.click() wait_page_loaded(self.w) assert "АРМ" in self.w.title time.sleep(0.5) actions = ActionChains(self.w) actions.move_to_element( page.section_allur).click().perform() # Перейти в строку отчеты time.sleep(0.5) page.node_ispDisp.click() # Перейти отчеты по исп дисциплине time.sleep(1) page.allu_NispDI.click() # Перейти отчеты с истекшим сроком time.sleep(1) page.confirm_4.click() # Перейти отчеты с истекшим сроком time.sleep(0.5) assert len( self.w.window_handles) == 2 # Проверка, что открытось 2 окно
def LogIN(self, username, password): # wait = WebDriverWait(self.w, 10, poll_frequency=1, # ignored_exceptions=[NoSuchElementException, # ElementNotVisibleException, # ElementNotSelectableException]) page = Locator(self.w) page.username_text = username #print(Locator.username_text) page.password_text = password page.LogIn_button.click() wait_page_loaded(self.w) assert "АРМ" in self.w.title time.sleep(0.5) actions = ActionChains(self.w) actions.move_to_element(page.myWork).click().perform() # Переход в управление моими запросами time.sleep(1) page.WorkImmid.click() # выбрать в моей работе срочные time.sleep(1) page.oneDocInList.click() #Первый документ в списке time.sleep(1) assert "Документ" in self.w.title # Проверка, что документ открылся
def LogIN(self, username, password): # wait = WebDriverWait(self.w, 10, poll_frequency=1, # ignored_exceptions=[NoSuchElementException, # ElementNotVisibleException, # ElementNotSelectableException]) page = Locator(self.w) page.username_text = username #print(Locator.username_text) page.password_text = password page.LogIn_button.click() wait_page_loaded(self.w) assert "АРМ" in self.w.title time.sleep(0.5) actions = ActionChains(self.w) actions.move_to_element(page.myWork).click().perform( ) # Переход в управление моими запросами time.sleep(0.5) page.WorkImmid.click() # выбрать в моей работе срочные time.sleep(0.5) page.checkBoxFirst.click() #Девятый документ в списке time.sleep(1) page.butExp_2.click() # Кнопка действия с выбором time.sleep(1) page.butSelExp.click() # Кнопка действия с выбором
def LogIN(self, username, password): # wait = WebDriverWait(self.w, 10, poll_frequency=1, # ignored_exceptions=[NoSuchElementException, # ElementNotVisibleException, # ElementNotSelectableException]) page = Locator(self.w) page.username_text = username print(Locator.username_text) page.password_text = password page.LogIn_button.click() wait_page_loaded(self.w) assert "АРМ" in self.w.title time.sleep(0.5) actions = ActionChains(self.w) actions.move_to_element(page.mySearch).click().perform() # Переход в управление моими запросами time.sleep(1) actions.move_to_element(page.poiskzapr).move_by_offset(-70, 0).click().perform() # развернуть на "+" page.zaprosToDel.click() # выбрать созданный по предусловию запрос time.sleep(1) page.checkBoxFirst.click() #Первый чекбокс в списке time.sleep(3) page.butExp.click() #Кнопка действия с выбором time.sleep(1) page.butSelExp.click() # Кнопка действия с выбором time.sleep(1)
def LogIN(self, username, password): # wait = WebDriverWait(self.w, 10, poll_frequency=1, # ignored_exceptions=[NoSuchElementException, # ElementNotVisibleException, # ElementNotSelectableException]) page = Locator(self.w) page.username_text = username print(Locator.username_text) page.password_text = password page.LogIn_button.click() wait_page_loaded(self.w) assert "АРМ" in self.w.title # time.sleep(1) # Кнопка поиск по ШК page.barcode_search.click() # Ввод номера ШК # time.sleep(1) page.search_bc.send_keys('469722' + Keys.RETURN) # time.sleep(1) # wait.until(EC.title_is(self.w.title)) wait_page_loaded(self.w) # Проверка, что документ открылся assert "Документ" in self.w.title
def LogIN(self, username, password): # wait = WebDriverWait(self.w, 10, poll_frequency=1, # ignored_exceptions=[NoSuchElementException, # ElementNotVisibleException, # ElementNotSelectableException]) page = Locator(self.w) page.username_text = username print(Locator.username_text) page.password_text = password page.LogIn_button.click() wait_page_loaded(self.w) assert "АРМ" in self.w.title time.sleep(0.5) # Перейти в уведомления page.notification.click() # wait.until(EC.title_is(self.w.title)) wait_page_loaded(self.w) # Проверка, что документ открылся page.notificationFirst.click() assert "Документ" in self.w.title
def LogIN(self, username, password): page = Locator(self.w) page.username_text = username page.password_text = password page.LogIn_button.click() wait_page_loaded(self.w)
def LogIN(self, username, password): # wait = WebDriverWait(self.w, 10, poll_frequency=1, # ignored_exceptions=[NoSuchElementException, # ElementNotVisibleException, # ElementNotSelectableException]) page = Locator(self.w) page.username_text = username print(Locator.username_text) page.password_text = password page.LogIn_button.click() wait_page_loaded(self.w)
def LogIN(self, username, password): # wait = WebDriverWait(self.w, 10, poll_frequency=1, # ignored_exceptions=[NoSuchElementException, # ElementNotVisibleException, # ElementNotSelectableException]) page = Locator(self.w) page.username_text = username print(Locator.username_text) page.password_text = password page.LogIn_button.click() wait_page_loaded(self.w) assert "АРМ" in self.w.title time.sleep(0.5) # Перейти в строку созданного запроса actions = ActionChains(self.w) actions.move_to_element(page.mySearch).click().perform() # wait.until(EC.title_is(self.w.title)) wait_page_loaded(self.w) page.ControlZapr.click() # Переход в управление поисковыми запросами page.listChange.click() # Переход в выпадающий список time.sleep(0.5) page.listChangeSZ.click( ) # Выбор служебной записки в выпадающем списке time.sleep(0.5) page.butSave.click() # Кнопка сохранить time.sleep(0.5) page.nameZap.send_keys('ToDel' + Keys.RETURN) # Сохранить с наименованием time.sleep(0.5) actions = ActionChains(self.w) actions.move_to_element(page.mySearch).click().perform( ) # Переход в управление моими запросами time.sleep(1) actions.move_to_element(page.poiskzapr).move_by_offset( -70, 0).click().perform() # развернуть на "+" time.sleep(1) assert page.zaprosToDel.is_displayed( ) # Проверка, что есть сохраненный элемент
def LogIN(self, username, password): wait = WebDriverWait(self.w, 10, poll_frequency=1, ignored_exceptions=[ NoSuchElementException, ElementNotVisibleException, ElementNotSelectableException ]) page = Locator(self.w) page.username_text = username print(Locator.username_text) page.password_text = password page.LogIn_button.click() wait_page_loaded(self.w) assert "АРМ" in self.w.title time.sleep(0.5) actions = ActionChains(self.w) actions.move_to_element(page.mySearch).click().perform( ) # Переход в управление моими запросами time.sleep(1) actions.move_to_element(page.poiskzapr).move_by_offset( -70, 0).click().perform() # развернуть на "+" page.zaprosToDel.click() # выбрать созданный по предусловию запрос time.sleep(1) page.butDel.click() time.sleep(1) page.butDelAc.click() time.sleep(1) actions = ActionChains(self.w) actions.move_to_element(page.mySearch).click().perform( ) # Переход в управление моими запросами time.sleep(1) actions.move_to_element(page.poiskzapr).move_by_offset( -70, 0).click().perform() # развернуть на "+" time.sleep(1) assert wait.until( EC.invisibility_of_element_located( (By.XPATH, KSEDLocators.zaprosToDel)))
def LogIN(self, username, password): # wait = WebDriverWait(self.w, 10, poll_frequency=1, # ignored_exceptions=[NoSuchElementException, # ElementNotVisibleException, # ElementNotSelectableException]) page = Locator(self.w) page.username_text = username print(Locator.username_text) page.password_text = password page.LogIn_button.click() wait_page_loaded(self.w) assert "АРМ" in self.w.title time.sleep(0.5) actions = ActionChains(self.w) actions.move_to_element(page.mySearch).click().perform( ) # Переход в управление моими запросами time.sleep(1) actions.move_to_element(page.poiskzapr).move_by_offset( -70, 0).click().perform() # развернуть на "+" page.zaprosToDel.click() # выбрать созданный по предусловию запрос time.sleep(1) page.butRed.click() time.sleep(1) page.listChange.click() # Переход в выпадающий список time.sleep(0.5) page.listChangeRD.click( ) # Выбор служебной записки в выпадающем списке time.sleep(2) page.butSave.click() # Кнопка сохранить time.sleep(0.5) page.nameZap.send_keys(Keys.RETURN) # Сохранить с наименованием actions = ActionChains(self.w) actions.move_to_element(page.mySearch).click().perform( ) # Переход в управление моими запросами time.sleep(1) actions.move_to_element(page.poiskzapr).move_by_offset( -70, 0).click().perform() # развернуть на "+" time.sleep(1) assert page.zaprosToDel.is_displayed() # Проверка, что отображается
def LogIN(self, username, password): # wait = WebDriverWait(self.w, 10, poll_frequency=1, # ignored_exceptions=[NoSuchElementException, # ElementNotVisibleException, # ElementNotSelectableException]) page = Locator(self.w) page.username_text = username print(Locator.username_text) page.password_text = password page.LogIn_button.click() page2 = MPages(self.w, self.w.current_url) wait_page_loaded(self.w) assert "АРМ" in self.w.title #time.sleep(0.5) actions = ActionChains(self.w) actions.move_to_element( page.section_allur).click().perform() # Перейти в строку отчеты time.sleep(0.5) # без этого ожидания не работает WebDriverWait(self.w, 5).until( EC.visibility_of_element_located( (By.XPATH, KSEDLocators.node_ispDisp))) page.node_ispDisp.click() # Перейти отчеты по исп дисциплине page2.melements.click() # time.sleep(1) page2.wait_page_loaded() page2.m2elements.click() # page.allu_SostIspR.click() # Перейти в раздел состояние исполнеия резолюций # time.sleep(2) WebDriverWait(self.w, 5).until( EC.visibility_of_element_located( (By.XPATH, KSEDLocators.confirm_3))) page.confirm_3.click() # Кнопка ОК time.sleep(0.5) assert len( self.w.window_handles) == 2 # Проверка, что открытось 2 окно
def LogIN(self, username, password): # wait = WebDriverWait(self.w, 10, poll_frequency=1, # ignored_exceptions=[NoSuchElementException, # ElementNotVisibleException, # ElementNotSelectableException]) page = Locator(self.w) page.username_text = username print(Locator.username_text) page.password_text = password page.LogIn_button.click() #page.wait(2) # Ожидание # select = Select(Locator.username_text) # select.select_by_visible_text("текст") wait_page_loaded(self.w) assert "АРМ" in self.w.title
def LogIN(self, username, password): # wait = WebDriverWait(self.w, 10, poll_frequency=1, # ignored_exceptions=[NoSuchElementException, # ElementNotVisibleException, # ElementNotSelectableException]) page = Locator(self.w) page.username_text = username print(Locator.username_text) page.password_text = password page.LogIn_button.click() wait_page_loaded(self.w) assert "АРМ" in self.w.title time.sleep(0.5) actions = ActionChains(self.w) actions.move_to_element(page.mySearch).click().perform() time.sleep(1) actions.move_to_element(page.poiskzapr).move_by_offset( -70, 0).click().perform() # Перейти в строку созданного запроса page.myPoiskZapr.click() # wait.until(EC.title_is(self.w.title)) wait_page_loaded(self.w) # Переход в первый документ в списке page.oneDocInList.click() # Проверка, что документ открылся assert "Документ" in self.w.title