Exemplo n.º 1
0
    def searchListingByAllCondition(driver, keyWord):
        try:
            CP = commonPage(driver)

            logging.info('清空关键字输入框内容')
            CP.keyWordObj().clear()
            sleep(1)

            logging.info('输入关键字:%s' % keyWord)
            CP.keyWordObj().send_keys(keyWord)
            sleep(1)

            logging.info('单击查询按钮')
            CP.searchButtonObj().click()
            sleep(5)

            operate_window_handle()
            logging.info('当前窗口的标题是:%s' % get_title())

            LP = listingPage(driver)

            logging.info('点击 公告 链接')
            LP.listingLinkObj().click()
            sleep(5)
        except Exception as e:
            raise e
Exemplo n.º 2
0
    def searchListingByAllCondition(driver, companyCode, startDate, endDate):
        try:
            LP = listingPage(driver)
            CP = commonPage(driver)

            logging.info('输入公司代码或者简称:%s' % companyCode)
            CP.inputCodeObj().send_keys(companyCode)
            sleep(1)

            logging.info('清除开始日期框中存在的日期')
            CP.startDateObj().clear()
            sleep(1)

            logging.info('选择开始日期:%s' % startDate)
            CP.startDateObj().send_keys(startDate)
            sleep(1)

            logging.info('清除结束日期框中存在的日期')
            CP.endDateObj().clear()
            sleep(1)

            logging.info('选择结束日期:%s' % endDate)
            CP.endDateObj().send_keys(endDate)
            sleep(1)

            logging.info('单击查询按钮')
            CP.searchButtonObj().click()
            sleep(5)

            logging.info('单击第一条公告链接')
            LP.announcementLinkObj().click()
            sleep(5)
        except Exception as e:
            raise e
Exemplo n.º 3
0
    def searchPeriodicByAllConditionAndEnterCompanyInfoPage(driver,companyCode):
        try:
            PP = periodicPage(driver)
            CP = commonPage(driver)

            # logging.info('选择的公告类型是:%s'%type)
            # CP.announcementTypeObj(type)
            # sleep(1)

            logging.info('清空公司代码或者简称输入框内容')
            CP.inputCodeObj().clear()
            sleep(1)

            logging.info('输入公司代码或者简称:%s'%companyCode)
            CP.inputCodeObj().send_keys(companyCode)
            sleep(1)

            # logging.info('清空日期内容')
            # CP.singleDate().clear()
            #
            # logging.info('选择日期:%s'%singleDate)
            # CP.singleDate().send_keys(singleDate)

            logging.info('单击查询按钮')
            CP.searchButtonObj().click()
            sleep(5)

            logging.info('点击 公司代码 链接')
            PP.companyCodeLinkObj().click()
            sleep(5)
        except Exception as e:
            raise e
Exemplo n.º 4
0
    def searchGeneralByAllCondition(driver,keyWord,value):
        try:
            CP = commonPage(driver)

            logging.info('清空关键字输入框内容')
            CP.keyWordObj().clear()
            sleep(1)

            logging.info('输入关键字:%s'%keyWord)
            CP.keyWordObj().send_keys(keyWord)
            sleep(1)

            logging.info('选择的值是:%s'%value)
            CP.singleSelectObj(value)

            logging.info('单击查询按钮')
            CP.searchButtonObj().click()
            sleep(5)

            operate_window_handle()
            logging.info('当前窗口的标题是:%s'%get_title())

            GP = generalPage(driver)

            logging.info('点击 公告 链接')
            GP.announcementLinkObj().click()
            sleep(5)
        except Exception as e:
            raise e
    def searchFundAnnouncementByAll(driver, companyCode, select, startDate,
                                    endDate):
        try:
            CP = commonPage(driver)
            FP = fundAnnouncementPage(driver)

            logging.info('清除公司代码或简称输入框的内容')
            CP.inputCodeObj().clear()

            logging.info('输入公司代码:%s' % companyCode)
            CP.inputCodeObj().send_keys(companyCode)
            sleep(2)

            logging.info('选择基金公告类型:%s' % select)
            CP.singleSelect2Obj(select)
            sleep(2)

            logging.info('输入开始时间:%s' % startDate)
            CP.startDateObj().send_keys(startDate)
            sleep(2)

            logging.info('输入结束时间:%s' % endDate)
            CP.endDateObj().send_keys(endDate)
            sleep(2)

            logging.info('单击查询按钮')
            CP.searchButtonObj().click()
            sleep(5)

            logging.info('点击基金信息公告链接')
            FP.fundAnnouncementLinkObj().click()
            sleep(8)
        except Exception as e:
            raise e
Exemplo n.º 6
0
    def searchChangeByAll(driver,companyCode,userName,startDate,endDate):
        try:
            CHP = changePage(driver)
            CP = commonPage(driver)

            logging.info('清除公司代码或简称输入框的内容')
            CP.inputCodeObj().clear()
            sleep(1)

            logging.info('输入公司代码:%s'%companyCode)
            CP.inputCodeObj().send_keys(companyCode)
            sleep(2)

            logging.info('清除姓名输入框的内容')
            CHP.userNameInputObj().clear()
            sleep(1)

            logging.info('填写的用户姓名是:%s'%userName)
            CHP.userNameInputObj().send_keys(userName)
            sleep(2)

            logging.info('清除开始日期存在的内容')
            CP.startDateObj().clear()
            sleep(1)

            logging.info('选择开始日期:%s'%startDate)
            CP.startDateObj().send_keys(startDate)
            sleep(1)

            logging.info('清除结束日期存在的内容')
            CP.endDateObj().clear()
            sleep(1)

            logging.info('选择结束日期:%s'%endDate)
            CP.endDateObj().send_keys(endDate)
            sleep(1)

            logging.info('点击查询按钮')
            CP.searchButtonObj().click()
            sleep(5)

            logging.info('点击公司code链接')
            CHP.companyCodeLinkObj().click()
            sleep(5)

            logging.info('获取当前窗口的标题:%s'%get_title())
        except Exception as e:
            raise e
Exemplo n.º 7
0
    def searchSuspensionByAllCondition(driver, date):
        try:
            CP = commonPage(driver)

            logging.info('清除日期')
            CP.singleDate().clear()
            sleep(1)

            logging.info('选择查询日期')
            CP.singleDate().send_keys(date)
            sleep(1)

            logging.info('单击查询按钮')
            CP.searchButtonObj().click()
            sleep(10)
        except Exception as e:
            raise e
Exemplo n.º 8
0
    def searchSecretariesByAll(driver, companyCode):
        try:
            SP = secretariesPage(driver)
            CP = commonPage(driver)

            logging.info('清除公司代码或简称输入框的内容')
            CP.inputCodeObj().clear()

            logging.info('输入公司代码:%s' % companyCode)
            CP.inputCodeObj().send_keys(companyCode)
            sleep(2)

            logging.info('点击查询按钮')
            CP.searchButtonObj().click()
            sleep(5)

            logging.info('点击公告链接')
            SP.codeLinkObj().click()
        except Exception as e:
            raise e
Exemplo n.º 9
0
    def searchSummariesByAllCondition(driver, companyCode, startDate, endDate):
        try:
            CP = commonPage(driver)

            logging.info('清空公司代码或者简称输入框内容')
            CP.inputCodeObj().clear()
            sleep(1)

            logging.info('输入公司代码或者简称:%s' % companyCode)
            CP.inputCodeObj().send_keys(companyCode)
            sleep(1)

            logging.info('清空开始日期内容')
            CP.startDateObj().clear()

            logging.info('选择开始日期:%s' % startDate)
            CP.startDateObj().send_keys(startDate)

            logging.info('清空结束日期内容')
            CP.endDateObj().clear()

            logging.info('选择结束日期:%s' % endDate)
            CP.endDateObj().send_keys(endDate)
            sleep(1)

            logging.info('单击查询按钮')
            CP.searchButtonObj().click()
            sleep(5)

            PP = summariesPage(driver)

            logging.info('点击 公告 链接')
            PP.announcementLinkObj().click()
            sleep(5)
        except Exception as e:
            raise e