Ejemplo n.º 1
0
    def test1(self):
        """名片制作申请"""
        driver = self.driver
        driver.get(self.base_url)

        #longin.login(self)

        # 初始化业务合同查询主页对象
        homepage = HomePage(self.driver)

        homepage.click_xz()

        homepage.sleep(0.5)

        homepage.click_xzfw()

        homepage.click_mpgl()

        homepage.sleep(0.1)

        homepage.click_mpzzsq()

        homepage.switch_frame(driver.find_element_by_xpath(
            "//iframe[@src='http://oa2.eascs.com/eaoa/businesscardSearchPre.do']"))

        driver.find_element_by_xpath("//*[@onclick='Search();']").click()
        # driver.refresh()
        a = driver.find_element_by_xpath("//*[@onclick='Search();']").get_attribute("value")
        #a = driver.find_element_by_xpath("//*[@onclick='btnSearch()']").text

        homepage.get_windows_img()  # 调用基类截图方法

        # 断言
        self.assertEqual(a, " 查询 ")
        homepage.get_page_title()
        print("***测试通过***")
Ejemplo n.º 2
0
    def test3_syrsq(self):
        """使用人申请"""
        driver = self.driver
        driver.get(self.base_url)

        #longin.login(self)

        # 初始化业务合同查询主页对象
        homepage = HomePage(self.driver)

        homepage.click_xz()

        homepage.sleep(0.5)

        homepage.click_yzgl()

        homepage.click_kbyyzgl()

        homepage.sleep(0.1)

        homepage.click_syrsq()

        homepage.switch_frame(
            driver.find_element_by_xpath(
                "//iframe[@src='http://oa2.eascs.com/eaoa/blankpaperUseSearchPre.do']"
            ))

        driver.find_element_by_xpath("//*[@onclick='Search()']").click()
        # driver.refresh()
        a = driver.find_element_by_xpath(
            "//*[@onclick='Search()']").get_attribute("value")

        homepage.get_windows_img()  # 调用基类截图方法

        # 断言
        self.assertEqual(a, " 查询 ")
        homepage.get_page_title()
        print("***测试通过***")
Ejemplo n.º 3
0
    def test1(self):
        """快件接收"""
        driver = self.driver
        driver.get(self.base_url)

        #longin.login(self)

        # 初始化业务合同查询主页对象
        homepage = HomePage(self.driver)

        homepage.click_xz()

        homepage.sleep(0.5)

        homepage.click_xzfw()

        #homepage.click_kdgl()
        ele = driver.find_element_by_xpath(".//*[@id='ea-scroll']/div/div[4]/div/div[7]/p")

        #ele.click()
        # menu_xpath = ".//*[@id='ea-scroll']/div/div[4]/div/div[7]/p"  # 更多产品XPATH
        # more_menu = WebDriverWait(driver=driver, timeout=15).until(EC.visibility_of_element_located((By.XPATH, menu_xpath)))
        # ActionChains(driver=driver).move_to_element(more_menu).perform()
        # time.sleep(3)  # 仅为能达到悬停效果睡眠,可删除

        ActionChains(driver).move_to_element(ele).perform()

        time.sleep(0.1)

        homepage.click_kjjs()

        homepage.switch_frame(driver.find_element_by_xpath(
            "//iframe[@src='http://oa2.eascs.com/eaoa/expressReceiveSearchPre.do']"))

        driver.find_element_by_xpath("//*[@onclick='Search();']").click()
        # driver.refresh()
        a = driver.find_element_by_xpath("//*[@onclick='Search();']").get_attribute("value")
        #a = driver.find_element_by_xpath("//*[@onclick='btnSearch()']").text

        homepage.get_windows_img()  # 调用基类截图方法

        # 断言
        self.assertEqual(a, " 查询 ")
        homepage.get_page_title()
        print("***测试通过***")
Ejemplo n.º 4
0
    def test5(self):
        """库存报表查询"""
        driver = self.driver
        driver.get(self.base_url)

        #longin.login(self)

        # 初始化业务合同查询主页对象
        homepage = HomePage(self.driver)

        homepage.click_xz()

        homepage.sleep(0.5)

        homepage.click_zcgl()

        homepage.click_dzyhpgl()

        homepage.sleep(0.1)

        homepage.click_kcbbcx()

        homepage.switch_frame(
            driver.find_element_by_xpath(
                "//iframe[@src='http://oa2.eascs.com/eaoa/adConsumestockReportSearchPre.do']"
            ))

        driver.find_element_by_xpath("//*[@onclick='Search()']").click()
        # driver.refresh()
        a = driver.find_element_by_xpath(
            "//*[@onclick='Search()']").get_attribute("value")
        #a = driver.find_element_by_xpath("//*[@onclick='btnSearch()']").text

        homepage.get_windows_img()  # 调用基类截图方法

        # 断言
        self.assertEqual(a, "查询")
        homepage.get_page_title()
        print("***测试通过***")
Ejemplo n.º 5
0
    def test5_jzdjcx(self):
        """借.转单据查询"""
        driver = self.driver
        driver.get(self.base_url)

        #longin.login(self)

        # 初始化业务合同查询主页对象
        homepage = HomePage(self.driver)

        homepage.click_xz()

        homepage.sleep(0.5)

        homepage.click_yzgl()

        homepage.click_jzdjcx()

        homepage.switch_frame(
            driver.find_element_by_xpath(
                "//iframe[@src='http://oa2.eascs.com/eaoa/assetsStampTransactionSearchPre.do']"
            ))

        driver.find_element_by_xpath("//*[@onclick='Search();']").click()
        # driver.refresh()
        a = driver.find_element_by_xpath(
            "//*[@onclick='Search();']").get_attribute("value")

        homepage.get_windows_img()  # 调用基类截图方法

        # 断言
        self.assertEqual(a, "查询")
        homepage.get_page_title()
        print("***测试通过***")
Ejemplo n.º 6
0
    def test9(self):
        """资产撤单申请"""
        driver = self.driver
        driver.get(self.base_url)

        #longin.login(self)

        # 初始化业务合同查询主页对象
        homepage = HomePage(self.driver)

        homepage.click_xz()

        homepage.sleep(0.5)

        homepage.click_zcgl()

        homepage.click_gdzcgl()

        homepage.sleep(0.2)

        homepage.click_zccdsq()

        driver.refresh()

        homepage.switch_frame(driver.find_element_by_xpath(
            "//iframe[@src='http://oa2.eascs.com/eaoa/fiBillCancelAstSearchPre.action']"))

        driver.find_element_by_xpath("//*[@onclick='btnSearch()']").click()
        # driver.refresh()
        a = driver.find_element_by_xpath("//*[@onclick='btnSearch()']").get_attribute("value")
        #a = driver.find_element_by_xpath("//*[@onclick='btnSearch()']").text

        homepage.get_windows_img()  # 调用基类截图方法

        # 断言
        self.assertEqual(a, "查询")
        homepage.get_page_title()
        print("***测试通过***")
Ejemplo n.º 7
0
    def test_02(self):
        """车辆证件管理"""
        driver = self.driver
        driver.get(self.base_url)

        #longin.login(self)

        # 初始化业务合同查询主页对象
        homepage = HomePage(self.driver)

        homepage.click_xz()

        homepage.sleep(0.5)

        homepage.click_xzfw()

        homepage.click_clgl()

        homepage.sleep(0.1)

        homepage.click_clzjgl()

        homepage.switch_frame(driver.find_element_by_xpath(
            "//iframe[@src='http://oa2.eascs.com/eaoa/vehicleCertificateSearchPre.action']"))

        driver.find_element_by_xpath("//*[@onclick='btnSearch()']").click()
        # driver.refresh()
        a = driver.find_element_by_xpath("//*[@onclick='btnSearch()']").get_attribute("value")
        #a = driver.find_element_by_xpath("//*[@onclick='btnSearch()']").text

        homepage.get_windows_img()  # 调用基类截图方法

        # 断言
        self.assertEqual(a, "查询")
        homepage.get_page_title()
        print("***测试通过***")
Ejemplo n.º 8
0
    def test3(self):
        """流程新建申请"""
        driver = self.driver
        driver.get(self.base_url)

        #longin.login(self)

        # 初始化业务合同查询主页对象
        homepage = HomePage(self.driver)

        homepage.click_xz()

        homepage.sleep(0.5)

        homepage.click_lzgl()

        homepage.click_lcxjsq()

        homepage.switch_frame(
            driver.find_element_by_xpath(
                "//iframe[@src='http://oa2.eascs.com/eaoa/demandmodifypre.do?isReturn=NO&from=LZ']"
            ))

        driver.find_element_by_xpath("//*[@value='返回']").click()
        # driver.refresh()
        a = driver.find_element_by_xpath(
            "//*[@onclick='Search()']").get_attribute("value")
        #a = driver.find_element_by_xpath("//*[@onclick='btnSearch()']").text

        homepage.get_windows_img()  # 调用基类截图方法

        # 断言
        self.assertEqual(a, " 查询 ")
        homepage.get_page_title()
        print("***测试通过***")
Ejemplo n.º 9
0
    def test2(self):
        """流程变更管理"""
        driver = self.driver
        driver.get(self.base_url)

        #longin.login(self)

        # 初始化业务合同查询主页对象
        homepage = HomePage(self.driver)

        homepage.click_xz()

        homepage.sleep(0.5)

        homepage.click_lzgl()

        homepage.click_lcbggl()

        homepage.switch_frame(
            driver.find_element_by_xpath(
                "//iframe[@src='http://oa2.eascs.com/eaoa/wfchangeSearchMychangePreAction.do']"
            ))

        driver.find_element_by_xpath("//*[@onclick='Search();']").click()
        # driver.refresh()
        a = driver.find_element_by_xpath(
            "//*[@onclick='Search();']").get_attribute("value")
        #a = driver.find_element_by_xpath("//*[@onclick='btnSearch()']").text

        homepage.get_windows_img()  # 调用基类截图方法

        # 断言
        self.assertEqual(a, " 查询 ")
        homepage.get_page_title()
        print("***测试通过***")
Ejemplo n.º 10
0
    def test2(self):
        """单位业务申请"""
        driver = self.driver
        driver.get(self.base_url)

        #longin.login(self)

        # 初始化业务合同查询主页对象
        homepage = HomePage(self.driver)

        homepage.click_xz()

        homepage.sleep(0.5)

        homepage.click_dwgl()

        homepage.sleep(0.1)

        homepage.click_dwywsq()

        homepage.switch_frame(
            driver.find_element_by_xpath(
                "//iframe[@src='http://oa2.eascs.com/eaoa/companyEstablishApplySearchPre.action']"
            ))

        driver.find_element_by_xpath("//*[@onclick='btnSearch();']").click()
        # driver.refresh()
        #a = driver.find_element_by_xpath("//*[@onclick='Search();']").get_attribute("value")
        a = driver.find_element_by_xpath("//*[@onclick='btnSearch();']").text

        homepage.get_windows_img()  # 调用基类截图方法

        # 断言
        self.assertEqual(a, "查询")
        homepage.get_page_title()
        print("***测试通过***")