Example #1
0
    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_ReesContrF.click()  # Перейти отчеты по авторам
        time.sleep(1)
        page.confirm_4.click()  # сформировать отчет
        time.sleep(0.5)
        assert len(
            self.w.window_handles) == 2  # Проверка, что открытось 2 окно
Example #2
0
    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.nineDocInList.click()  #Девятый документ в списке
        time.sleep(0.5)
        page.connectedDoc.click()  # меню связи
        time.sleep(0.5)
        page.oneDocInList.click()  # меню связи
        time.sleep(4)
        assert "Документ" in self.w.title  # Проверка, что документ открылся
Example #3
0
    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
Example #4
0
    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
Example #5
0
    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)
Example #6
0
    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)
Example #7
0
    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(
        )  # Проверка, что есть сохраненный элемент
Example #8
0
    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)))
Example #9
0
    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()  # Проверка, что отображается
Example #10
0
    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 окно
Example #11
0
    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
Example #12
0
    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
Example #13
0
    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(3)
        page.butAct_2.click()  # Кнопка действия с выбором
        time.sleep(1)
        page.butFavorite.click()  # Кнопка добавить в избранное
        time.sleep(1)
        page.butOK.click()  # Кнопка действия с выбором
        time.sleep(1)
        page.butOK.click()  # Кнопка действия с выбором
        time.sleep(1)
        assert page.oblProsm.is_displayed()