Пример #1
0
    def renyuanInfo(self):
        # 获取参考人员
        GetCankaorenyuanInfo.click_add_button(self)
        if GetCankaorenyuanInfo.get_textrenyuan(self) == "选择人员":
            print("成功跳转至选择人员弹窗")
            # 点击参考人员文件夹
            GetCankaorenyuanInfo.click_files(self)
            # 点击源列表按钮
            GetCankaorenyuanInfo.click_yuanliebiao(self)

            if GetCankaorenyuanInfo.get_element_display(self) is not None:
                print("参考人员存在!")
                # 点击向右移动按钮
                GetCankaorenyuanInfo.click_right_button(self)
                # 点击提交按钮
                GetCankaorenyuanInfo.click_commit_button(self)
                self.kaozhan()

            else:
                nametext = GetCankaorenyuanInfo.get_element_display(self)
                print("未显示参考人员列表: " + nametext)
                XinJianKaoHe.get_windows_img(self)
                self.driver.quit()

        else:
            nametext = GetCankaorenyuanInfo.get_textrenyuan(self)
            print("未获取到正确的页面断言文字: " + nametext)
            XinJianKaoHe.get_windows_img(self)
            self.driver.quit()
Пример #2
0
    def renyuanInfo(self):
        # 获取参考人员
        GetCankaorenyuanInfo.click_add_button(self)
        if GetCankaorenyuanInfo.get_textrenyuan(self) == "选择人员":
            print("pass")
            # 点击参考人员文件夹
            GetCankaorenyuanInfo.click_files(self)
            # 点击源列表按钮
            GetCankaorenyuanInfo.click_yuanliebiao(self)
            # 点击向右移动按钮
            GetCankaorenyuanInfo.click_right_button(self)
            # 点击提交按钮
            GetCankaorenyuanInfo.click_commit_button(self)
            self.kaozhan1()

        else:
            nametext = GetCankaorenyuanInfo.get_textrenyuan(self)
            print("未获取到正确的页面断言文字: " + nametext)
            XinJianKaoHe.get_windows_img(self)
            self.driver.quit()