Esempio n. 1
0
    def test5_edbb(self):
        """额度报表"""
        driver = self.driver
        driver.get(self.base_url)

        #longin.login(self)

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

        homepage.click_oa()

        homepage.sleep(0.5)

        homepage.click_cwgl()

        homepage.click_ysgl()

        homepage.sleep(0.4)

        homepage.click_edbb()

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

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

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

        # 断言

        self.assertEqual(homepage.get_nd(), "年度")

        homepage.get_page_title()

        print("***测试通过***")

        # 关闭窗口

        homepage.back_frame()

        driver.find_element_by_xpath("/html/body/div/div[2]/ul/i").click()
Esempio n. 2
0
    def test3_tsyxsq(self):
        """邮件组发送申请"""
        driver = self.driver
        driver.get(self.base_url)

        #longin.login(self)

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

        homepage.click_oa()

        homepage.sleep(0.5)

        homepage.click_itfw()

        homepage.click_yxgl()

        homepage.sleep(0.1)

        homepage.click_yjzfssq()

        homepage.switch_frame(
            driver.find_element_by_xpath(
                "//iframe[@src='http://oa2.eascs.com/eaoa/groupapplySearchPre.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("***测试通过***")

        # 关闭窗口

        homepage.back_frame()

        driver.find_element_by_xpath("/html/body/div/div[2]/ul/i").click()
Esempio n. 3
0
	def test_hscsh(self):
		"""核算初始化"""
		driver = self.driver
		driver.get(self.base_url)

		#longin.login(self)

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

		homepage.click_oa()

		homepage.sleep(0.5)
        
		homepage.click_cwgl()

		homepage.click_hscsh()


		homepage.switch_frame(driver.find_element_by_xpath("//iframe[@src='http://ehr.eascs.com/finBudgetManageByAccount.action?isReturn=NO']"))

		homepage.switch_frame("leftFrame")


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

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


		#展开菜单
		driver.find_element_by_xpath("//tr[@id='datagrid-row-r2-2-42603']/td[2]/div/span").click()

		# 断言
		homepage.get_page_title()
		print("***测试通过***")

		#self.driver.quit()
		# 关闭窗口 

		homepage.back_frame()
		
		driver.find_element_by_xpath("/html/body/div/div[2]/ul/i").click()
Esempio n. 4
0
    def test_cxdjsp(self):
        """撤销单据审批"""
        driver = self.driver
        driver.get(self.base_url)

        #longin.login(self)

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

        homepage.click_oa()

        homepage.sleep(0.5)

        homepage.click_cwgl()

        homepage.click_cxdjsp()

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

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

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

        # 断言

        self.assertEqual(homepage.get_cxdjlx(), "撤消单据类型")
        homepage.get_page_title()
        print("***测试通过***")

        #self.driver.quit()
        #
        # 关闭窗口

        homepage.back_frame()

        driver.find_element_by_xpath("/html/body/div/div[2]/ul/i").click()
Esempio n. 5
0
    def test_NCfjzsq(self):
        """NC反记账申请"""
        driver = self.driver
        driver.get(self.base_url)

        longin.login(self)

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

        homepage.click_oa()

        homepage.sleep(0.5)

        homepage.click_cwgl()

        homepage.click_fjzsq()

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

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

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

        # 断言

        self.assertEqual(homepage.get_ztbm(), "单据状态")
        homepage.get_page_title()
        print("***测试通过***")

        #self.driver.quit()
        # 关闭窗口

        homepage.back_frame()

        driver.find_element_by_xpath("/html/body/div/div[2]/ul/i").click()
Esempio n. 6
0
	def test_sdssb(self):
		"""所得税申报"""
		driver = self.driver
		driver.get(self.base_url)

		#longin.login(self)

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

		homepage.click_oa()

		homepage.sleep(0.5)
        
		homepage.click_swgl()

		homepage.click_sdssb()


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


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

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

		# 断言

		self.assertEqual(homepage.get_sksssj(),"税款所属时间")
		homepage.get_page_title()
		print("***测试通过***")

		#self.driver.quit()
		#
		# 关闭窗口 

		homepage.back_frame()
		
		driver.find_element_by_xpath("/html/body/div/div[2]/ul/i").click()
Esempio n. 7
0
	def test_jbxx(self):
		"""基本信息"""
		driver = self.driver
		driver.get(self.base_url)

		#longin.login(self)

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

		homepage.click_oa()

		homepage.sleep(0.5)
        
		homepage.click_swgl()

		homepage.click_jbxx()


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


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

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

		# 断言

		self.assertEqual(homepage.get_dwbm(),"单位编码")
		homepage.get_page_title()
		print("***测试通过***")

		#self.driver.quit()
		#
		# 关闭窗口 

		homepage.back_frame()
		
		driver.find_element_by_xpath("/html/body/div/div[2]/ul/i").click()
Esempio n. 8
0
    def test_fybx(self):
        """费用报销"""
        driver = self.driver
        driver.get(self.base_url)

        #longin.login(self)

        # 初始化对象
        homepage = HomePage(self.driver)

        homepage.click_oa()

        homepage.sleep(0.5)

        homepage.click_cwgl()

        homepage.click_fybx()

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

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

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

        # 断言

        self.assertEqual(homepage.get_djbh(), "单据编号")
        homepage.get_page_title()
        print("***测试通过***")

        # 关闭窗口

        homepage.back_frame()

        driver.find_element_by_xpath("/html/body/div/div[2]/ul/i").click()
Esempio n. 9
0
    def test1_fasp(self):
        """400电话管理 """
        driver = self.driver
        driver.get(self.base_url)

        #longin.login(self)

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

        homepage.click_oa()

        homepage.sleep(0.5)

        homepage.click_yygl()

        homepage.click_dhgl()

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

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

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

        # 断言
        self.assertEqual(a, "关闭申请")
        homepage.get_page_title()
        print("***测试通过***")

        # 关闭窗口

        homepage.back_frame()

        driver.find_element_by_xpath("/html/body/div/div[2]/ul/i").click()
Esempio n. 10
0
    def test_ysycsq(self):
        """应收异常申请"""
        driver = self.driver
        driver.get(self.base_url)

        #longin.login(self)

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

        homepage.click_oa()

        homepage.sleep(0.5)

        homepage.click_cwgl()

        homepage.click_ysycsq()

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

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

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

        # 断言

        self.assertEqual(homepage.get_jskh(), "结算客户")
        homepage.get_page_title()
        print("***测试通过***")

        #self.driver.quit()
        homepage.back_frame()

        driver.find_element_by_xpath("/html/body/div/div[2]/ul/i").click()