def test_houseCqQuery_5(self, openQueryCenter): driver = openQueryCenter WebTools(driver).mouse_click( 'xpath', "//th[contains(text(),'查询条件')]/..//label[2]/span[1]") WebTools(driver).input_clear( 'xpath', "//label[contains(text(),'不动产单元号')]/..//input") WebTools(driver).input_content( 'xpath', "//label[contains(text(),'不动产单元号')]/..//input", '12312312312') WebTools(driver).mouse_click('xpath', "//span[contains(text(),'点击生成受理编号')]") WebTools(driver).mouse_click('xpath', "//span[contains(text(),'下一步')]")
def szHandle(self, bdcdyh, env): # 将页面滚动条拖到顶部 self.driver.execute_script( "var q = document.documentElement.scrollTop=0") WebTools(self.driver).mouse_doubleClick( 'xpath', "//div[contains(text(),'" + bdcdyh + "')]/../..") WebTools(self.driver).check_element_is_exists( 'xpath', '//span[@xid="saveZsZmBtn"]') # time.sleep(1) #提交 if env == 'sqtest': WebTools(self.driver).mouse_click( 'xpath', '//span[@functionname="commitBtnClick"]') else: WebTools(self.driver).mouse_click( 'xpath', '//div[@id="applicationHost"]/div[1]/div[2]/div/section[2]/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/div[1]/div[2]/span[1]' ) WebTools(self.driver).check_element_is_exists('class_name', 'BeAlert_box') WebTools(self.driver).mouse_click( 'xpath', '//button[@class="BeAlert_confirm"]') time.sleep(1) # 任务流转==>发证 WebTools(self.driver).check_element_is_exists( 'xpath', "//span[@xid='span31_1']") WebTools(self.driver).mouse_click('xpath', "//span[@xid='span31_1']")
def test_houseCqQuery_4(self, qlrmc, qlrzjhm, openQueryCenter): driver = openQueryCenter print(qlrmc, qlrzjhm) WebTools(driver).input_content('xpath', "//th[text()='权利人姓名']/../td[1]//input", qlrmc) WebTools(driver).input_content( 'xpath', "//th[text()='权利人证件号码']/../td[1]//input", qlrzjhm) WebTools(driver).mouse_click('xpath', "//span[contains(text(),'点击生成受理编号')]") WebTools(driver).mouse_click('xpath', "//span[contains(text(),'下一步')]") val = WebTools(driver).is_element_exist( "//div[@class='ivu-table-body ivu-table-overflowX']") assert val == False
def openProcessCenter(login): ''' :param login: 装饰器 调取登录方法(login(fixture)-->conftest) :return: driver对象 :action: 模块下每个用例执行前需打开办件中心模块,执行后关闭办件中心 ''' driver = login logger.debug("打开办件中心模块") taskCenter(driver).workCenter() yield driver WebTools(driver).is_element_exist("//i[@class='icon-close-round cFNvY7v']") WebTools(driver).mouse_click('xpath', "//i[@class='icon-close-round cFNvY7v']") logger.debug("关闭办件中心模块")
def test_houseCqQuery_3(self, openQueryCenter): driver = openQueryCenter sql = data.get('test_houseCqQuery_1').get('params').get('sql') bdcdyh = dataInit().getHouseCfRegisterData() WebTools(driver).mouse_click( 'xpath', "//th[contains(text(),'查询条件')]/..//label[2]/span[1]") WebTools(driver).input_content( 'xpath', "//label[contains(text(),'不动产单元号')]/..//input", bdcdyh) WebTools(driver).mouse_click('xpath', "//span[contains(text(),'点击生成受理编号')]") WebTools(driver).mouse_click('xpath', "//span[contains(text(),'下一步')]") res = WebTools( driver).is_element_exist("//span[text()='" + bdcdyh + "'] /../../../td[8]//span[text()='有']") assert res
def openQueryCenter(login): ''' :param login: 装饰器 调取登录方法(login(fixture)-->conftest) :return: driver对象 :action: 模块下每个用例执行前需打开查询中心模块,执行后关闭查询中心 ''' driver = login logger.debug("打开查询中心模块") # 查询中心 taskCenter(driver).queryCenter() yield driver logger.debug("关闭查询中心模块") WebTools(driver).switch_back_iframe() WebTools(driver).mouse_click('xpath', "//a[@xid='closeFuncBtn']")
def test_4(self, openQueryCenter): self.driver = openQueryCenter[0] print("执行测试用例4啦。。。") print("case4:", openQueryCenter) # WebTools(self.driver).mouse_click('xpath',"//span[contains(text(),'返回')]") WebTools(self.driver).mouse_click( 'xpath', "//th[contains(text(),'查询条件')]/..//label[2]/span[1]") WebTools(self.driver).input_clear( 'xpath', "//label[contains(text(),'不动产单元号')]/..//input") WebTools(self.driver).input_content( 'xpath', "//label[contains(text(),'不动产单元号')]/..//input", '12312312312') WebTools(self.driver).mouse_click( 'xpath', "//span[contains(text(),'点击生成受理编号')]") WebTools(self.driver).mouse_click('xpath', "//span[contains(text(),'下一步')]")
def sflzbHandle(self): WebTools(self.driver).check_element_is_exists('link_text', '收费领证表') WebTools(self.driver).mouse_click('link_text', '收费领证表') self.driver.execute_script('document.documentElement.scrollTop=0') time.sleep(3) # WebTools(self.driver).check_element_is_exists('xpath','//span[@xid="initChargeBtn"]') # 收费信息 WebTools(self.driver).mouse_click('xpath', "//span[@xid='initChargeBtn']") WebTools(self.driver).mouse_click('xpath', "//span[contains(text(),'收费完成')]") time.sleep(2) # 证书生成 WebTools(self.driver).mouse_click('xpath', "//span[@xid='create']") time.sleep(3)
def slHandle(self): ''' :param link: 受理环节 :return: ''' # 提交 WebTools(self.driver).mouse_click( 'xpath', '//span[@functionname="commitBtnClick"]') # 针对页面点击确定弹出框提示信息,点击确定 WebTools(self.driver).allow_element_is_exists('class_name', 'BeAlert_box') # 受理环节弹出框确定按钮 WebTools(self.driver).check_element_is_exists('xpath', "//a[@xid='okBtn']") time.sleep(1) WebTools(self.driver).mouse_click('xpath', "//a[@xid='okBtn']") WebTools(self.driver).check_element_is_exists( 'xpath', '//span[@xid="newTask"]')
def bdcjbxxQuery(self, bdcdyh, data): ywlxID = data.get('initdata').get('lcInfo', None).get('ywlxID', None) # 项目类多幢首次 if ywlxID == '608286609F5C429CB32BA42C56F7C7F7': WebTools(self.driver).check_element_is_exists( 'xpath', "//div[@xid='_compose_xzdyDialog_']//input[@xid='bdcdyh']") WebTools(self.driver).input_content( 'xpath', "//div[@xid='_compose_xzdyDialog_']//input[@xid='bdcdyh']", bdcdyh) WebTools(self.driver).mouse_click( 'xpath', "//div[@xid='_compose_xzdyDialog_']//span[contains(text(),'查询')]" ) time.sleep(2) WebTools(self.driver).mouse_click( 'xpath', "//table[@xid='resultTable']//tbody/tr[1]//td[contains(text(),'" + bdcdyh + "')]") WebTools(self.driver).mouse_click( 'xpath', "//div[@xid='_compose_xzdyDialog_']//span[contains(text(),'确认')]" ) # 针对页面点击确定弹出框提示信息,点击确定 WebTools(self.driver).allow_element_is_exists( 'class_name', 'BeAlert_box')
def workCenter(self): # 判断办件中心菜单是否出现 WebTools(self.driver).check_element_is_exists('xpath', "//div[@xid='mainMenu']/div[1]/div[1]") WebTools(self.driver).check_element_is_exists('xpath', "//div[contains(text(),'登记簿查询')]") # 办件中心 WebTools(self.driver).mouse_click('xpath', "//div[@xid='mainMenu']/div[1]/div[1]") # 判断新建任务菜单是否出现 WebTools(self.driver).check_element_is_exists('xpath', "//span[@xid='newTask']") # 等待办件中心办件数据加载 time.sleep(4) # 新建任务 WebTools(self.driver).mouse_click('xpath',"//span[contains(text(),'新建任务')]") # 判断新建任务菜单页是否出现 WebTools(self.driver).check_element_is_exists('link_text', "国有建设用地使用权")
def login(request, getConfValue): logger.debug("yaml中读取配置内容:%s" % getConfValue) driver_path = getConfValue.get('envinfo').get('browserDriver', None) logger.debug("浏览器驱动路径:%s" % driver_path) login_url = getConfValue.get('envinfo').get('url', None) logger.debug("url路径:%s" % login_url) login_info = getConfValue.get('envinfo').get('loginInfo', None) logger.debug("登录用户信息:%s" % login_info) logger.debug("<--------读取初始化配置数据end-------->") if driver_path and login_url and login_info: driver = webdriver.Chrome(executable_path=driver_path) WebTools(driver).set_browser(login_url) #登录 WebTools(driver).check_element_is_exists( 'xpath', "//div[contains(@id,'_btnlogin')]") WebTools(driver).input_clear('xpath', "//input[contains(@id,'_name')]") WebTools(driver).input_clear('xpath', "//input[contains(@id,'_password')]") WebTools(driver).input_content('xpath', "//input[contains(@id,'_name')]", login_info.get('user')) WebTools(driver).input_content('xpath', "//input[contains(@id,'_password')]", login_info.get('passwd')) WebTools(driver).mouse_click('xpath', "//div[contains(@id,'_btnlogin')]") WebTools(driver).check_element_is_exists( 'xpath', "//div[contains(text(),'办件中心')]") yield driver # 登出系统、退出浏览器 logout(driver).logout() driver.quit() else: logger.error("全局登录信息缺失,请检查yaml配置文件。") sys.exit(-1)
def test_1(self, openQueryCenter): self.driver = openQueryCenter[0] dbInfo = openQueryCenter[1] print("执行测试用例1啦。。。") print("case1:", openQueryCenter) WebTools(self.driver).mouse_click( 'xpath', "//th[contains(text(),'查询条件')]/..//label[2]/span[1]") WebTools(self.driver).input_content( 'xpath', "//label[contains(text(),'不动产单元号')]/..//input", '321322100002GB00124F50210105') WebTools(self.driver).mouse_click( 'xpath', "//span[contains(text(),'点击生成受理编号')]") WebTools(self.driver).mouse_click('xpath', "//span[contains(text(),'下一步')]") WebTools(self.driver).switch_back_iframe() WebTools(self.driver).mouse_click('xpath', "//a[@xid='closeFuncBtn']") assert True
def test_houseCqQuery_1(self, openQueryCenter): # global driver # driver = openQueryCenter[0] driver = openQueryCenter bdcdyh = dataInit().getHouseCqRegisterData() WebTools(driver).mouse_click( 'xpath', "//th[contains(text(),'查询条件')]/..//label[2]/span[1]") WebTools(driver).input_content( 'xpath', "//label[contains(text(),'不动产单元号')]/..//input", bdcdyh) WebTools(driver).mouse_click('xpath', "//span[contains(text(),'点击生成受理编号')]") WebTools(driver).mouse_click('xpath', "//span[contains(text(),'下一步')]") WebTools(driver).mouse_click( 'xpath', "//span[contains(text(),'" + bdcdyh + "')]/../../../td[1]//input[@type='checkbox']") WebTools(driver).mouse_click( 'xpath', "//span[(text()='现势信息')]/..//span[contains(text(),'登记证明')]") import time time.sleep(2) val = WebTools(driver).is_element_exist("//*[@id='viewer']") assert val
def queryCenter(self): WebTools(self.driver).check_element_is_exists('xpath', "//div[@title='查询中心']") WebTools(self.driver).mouse_click('xpath', "//div[@title='查询中心']") WebTools(self.driver).switch_iframe("//iframe[@class='ifram ckcx cfARBJ3']", 'xpath') WebTools(self.driver).check_element_is_exists('xpath',"//span[@class='layout-text' and contains(text(),'查询中心')]")
def xwjlHandle(self): WebTools(self.driver).check_element_is_exists('link_text','询问记录') WebTools(self.driver).mouse_click('link_text', '询问记录') WebTools(self.driver).check_element_is_exists('xpath','//table[@xid="printTable"]//*[contains(text(),"询问记录")]')
def fdcmmhtHandle(self): WebTools(self.driver).check_element_is_exists('link_text','房地产买卖合同') WebTools(self.driver).mouse_click('link_text', '房地产买卖合同') WebTools(self.driver).check_element_is_exists('xpath','//div[@xid="sjsTit"]')
def dbHandle(self, bdcdyh): ''' 登簿环节 :bdcdyh: 不动产单元号 :return: ''' # 办件中心检索该办件业务是否存在 self.driver.execute_script('document.documentElement.scrollTop=0') # self.driver.execute_script('document.documentElement.scrollTop=document.body.clientHeight') WebTools(self.driver).mouse_click( 'xpath', "//select[@xid='mySelect']//option[@value='BDCDYH']") WebTools(self.driver).input_clear('xpath', "//input[@xid='myText']") WebTools(self.driver).input_content('xpath', "//input[@xid='myText']", bdcdyh) WebTools(self.driver).mouse_click('xpath', "//span[@xid='search']") # 校验该数据是否存在 WebTools(self.driver).check_element_is_exists( 'xpath', "//div[contains(text(),'登簿')]/../..") WebTools(self.driver).mouse_doubleClick( 'xpath', "//div[contains(text(),'登簿')]/../..") # 登簿意见 WebTools(self.driver).check_element_is_exists( 'xpath', "//textarea[@xid='shyj0']") WebTools(self.driver).check_element_is_exists( 'xpath', "//textarea[@xid='currentShyj']") WebTools(self.driver).input_content('xpath', "//textarea[@xid='currentShyj']", '审核同意') # 登簿提交 WebTools(self.driver).mouse_click( 'xpath', '//span[@functionname="commitBtnClick"]') #任务流转==>制证(非注销流程) WebTools(self.driver).check_element_is_exists('xpath', "//a[@xid='okBtn']") WebTools(self.driver).mouse_click('xpath', "//a[@xid='okBtn']") WebTools(self.driver).check_element_is_exists('xpath', '//span[@xid="myTask"]')
def shHandle(self, bdcdyh): ''' :param bdcdyh: 不动产单元号 :return: ''' # 办件中心检索该办件业务 self.driver.execute_script( 'document.documentElement.scrollTop=document.body.clientHeight') WebTools(self.driver).mouse_click( 'xpath', "//select[@xid='mySelect']//option[@value='BDCDYH']") WebTools(self.driver).input_clear('xpath', "//input[@xid='myText']") WebTools(self.driver).input_content('xpath', "//input[@xid='myText']", bdcdyh) WebTools(self.driver).mouse_click('xpath', "//span[@xid='search']") # 校验该数据是否存在 WebTools(self.driver).check_element_is_exists( 'xpath', "//div[contains(text(),'初审') or contains(text(),'复审')]/../..") WebTools(self.driver).mouse_doubleClick( 'xpath', "//div[contains(text(),'初审') or contains(text(),'复审')]/../..") # 填写复审/审核意见 WebTools(self.driver).check_element_is_exists( 'xpath', "//textarea[@xid='currentShyj']") WebTools(self.driver).input_content('xpath', "//textarea[@xid='currentShyj']", '同意') # 提交 WebTools(self.driver).mouse_click( 'xpath', '//span[@functionname="commitBtnClick"]') WebTools(self.driver).check_element_is_exists('xpath', "//a[@xid='okBtn']") WebTools(self.driver).mouse_click('xpath', "//a[@xid='okBtn']") WebTools(self.driver).check_element_is_exists( 'xpath', '//span[@xid="newTask"]')
def logout(self): time.sleep(1) WebTools(self.driver).mouser_move_action('xpath',"//a[@data-toggle='dropdown']") WebTools(self.driver).check_element_is_exists('xpath',"//a[@data-toggle='dropdown' and @aria-expanded='true']") WebTools(self.driver).mouse_click('xpath',"//a[contains(text(),'修改密码')]/../..//a[contains(text(),'注销')]")
def sqbHandle(self, data): ''' 封装申请表页面 :param bdcdyh 受理件不动产单元号 :param data (dict) :param lcInfo (dict) :param qllx: 权利类型, :param djlx: 登记类型(optional) :param ywlxID: 业务类型ID :param params (dict) :param ywxl :业务小类 :param sffz :是否发证(1-发证) :param sfpl :是否批量(1-批量) :param cqType :产权类型(0-净地,1-房屋) :return: ''' qllx = data.get('initdata').get('lcInfo', None).get('qllx', None) djlx = data.get('initdata').get('lcInfo', None).get('djlx', None) ywlxID = data.get('initdata').get('lcInfo', None).get('ywlxID', None) ywxl = data.get('initdata').get('params', None).get('ywxl', None) sfpl = data.get('initdata').get('params', None).get('sfpl', None) sfztfz = data.get('initdata').get('params', None).get('sfztfz', None) cqType = data.get('initdata').get('params', None).get('cqType', None) sfydy = data.get('initdata').get('params', None).get('sfydy', None) sfdyzx = data.get('initdata').get('params', None).get('sfdyzx', None) WebTools(self.driver).check_element_is_exists('link_text', '申请表') WebTools(self.driver).mouse_click('link_text', '申请表') # 将页面滚动条拖到顶部 self.driver.execute_script("document.documentElement.scrollTop=0") time.sleep(1) try: WebDriverWait(self.driver, 15).until( EC.visibility_of_element_located( (By.XPATH, "//input[@xid='ywh']"))) # 批量查封/ except (NoSuchElementException, TimeoutException, ElementNotVisibleException): WebDriverWait(self.driver, 15).until( EC.visibility_of_element_located( (By.XPATH, "//*[@xid='sqbTable']//input[@xid='YWH']"))) except (NoSuchElementException, TimeoutException, ElementNotVisibleException): WebDriverWait(self.driver, 15).until( EC.visibility_of_element_located( (By.XPATH, "//input[@xid='YWH']"))) except Exception as e: logger.error("申请表页面【业务号】字段加载失败,错误信息:%s" % e) sys.exit(-1) # 因数据问题,部分环境数据不满足要求 if qllx == '国有建设用地使用权': if djlx == '首次登记': # 独用土地面积 WebTools(self.driver).input_clear('xpath', "//input[@xid='tdsyqdymj']") WebTools(self.driver).input_content( 'xpath', "//input[@xid='tdsyqdymj']", '0.01') elif qllx == '国有建设用地使用权及房屋所有权': if djlx != '注销登记': # 是否整体发证处理(涉及项目类多幢,在建工程抵押,批量抵押等) # 整体发证 if sfztfz == 1: WebTools(self.driver).mouse_click( 'xpath', "//input[@name='SFZTFZ' and @value='1']") # 按幢发证 elif sfztfz == 0: WebTools(self.driver).mouse_click( 'xpath', "//input[@name='SFZTFZ' and @value='0']") # 权利其他状况,其他,附记处理 ywlxList = [ '191B4FB37DD148448BC64944C01A78C1', # 建筑物区分业主共有部分 'F711B2126C44409D903254C246FCD569', # 房屋首次登记 '7E9CABA30D4749D499654390D0ED4DDB', # 批量转移 '608286609F5C429CB32BA42C56F7C7F7', # 项目类多幢首次 ] # 建筑物区分业主共有部分,房屋首次登记,批量转移不生成 if ywlxID not in ywlxList: # 将页面滚动条拖到底部 self.driver.execute_script( "document.documentElement.scrollTop=550") # 生成权利其他状况 WebTools(self.driver).mouse_click( 'xpath', "//span[@xid='createQL']") # 生成附记 WebTools(self.driver).mouse_click( 'xpath', "//span[@xid='createFJ']") elif qllx == '抵押权': if djlx != '注销登记': #预置数据(当前时间) currentDate = time.strftime('%Y-%m-%d', time.localtime(time.time())) #预置数据(抵押结束时间) fetureDate = time.strftime( '%Y-%m-%d', time.localtime(time.time() + 86400 * 365 * 10)) #抵押方式 WebTools(self.driver).choose_droplist('name', 'DYFS', '1') # 抵押不动产类型 if cqType == 0: WebTools(self.driver).choose_droplist( 'name', 'DYBDCLX', '1') elif cqType == 1: WebTools(self.driver).choose_droplist( 'name', 'DYBDCLX', '2') else: logger.error("产权类型【cqType】未传值,请检查yml文件") sys.exit(-1) # 抵押合同签订日期 WebTools(self.driver).input_content( 'xpath', "//input[@xid='DYHTQDRQ']", currentDate) # 债务履行起始时间 WebTools(self.driver).input_content( 'xpath', "//input[@xid='ZWLXQSSJ' or @xid='zwlxqssj']", currentDate) # 债务履行结束时间 WebTools(self.driver).input_content( 'xpath', "//input[@xid='ZWLXJSSJ' or @xid='zwlxjssj']", fetureDate) if sfpl == 1: # 担保范围 WebTools(self.driver).input_clear( 'xpath', "//input[@xid='dbfw' or @xid='DBFW']") WebTools(self.driver).input_content( 'xpath', "//input[@xid='dbfw' or @xid='DBFW']", '房屋产权') # 是否存在禁止或限制转让不动产的约定 WebTools(self.driver).mouse_click( 'xpath', "//input[@name='SFXZZR' and @value='0']") # 整体发证 if sfztfz == 1: WebTools(self.driver).mouse_click( 'xpath', "//input[@name='SFZTFZ' and @value='1']") # 总抵押金额 WebTools(self.driver).input_content( 'xpath', "//input[@xid='bdbzqse' or @xid='BDBZQSE']", '2000') # 按单元发证 elif sfztfz == 0: WebTools(self.driver).mouse_click( 'xpath', "//input[@name='SFZTFZ' and @value='0']") else: # 不动产价值 WebTools(self.driver).input_clear('xpath', "//input[@xid='dywjz']") WebTools(self.driver).input_content( 'xpath', "//input[@xid='dywjz']", '100') # 被担保主债权数额 WebTools(self.driver).input_clear( 'xpath', "//input[@xid='bdbzqse']") WebTools(self.driver).input_content( 'xpath', "//input[@xid='bdbzqse']", '80') # 将页面滚动条拖到指定元素(登记原因) WebTools(self.driver).srollBarToElement( "//textarea[@xid='djyy']") # 是否存在禁止或限制转让不动产的约定 WebTools(self.driver).mouse_click( 'xpath', "//input[@name='SFXZZR' and @value='0']") # 最高债权确定事实和数额 WebTools(self.driver).input_clear( 'xpath', "//textarea[@xid='ZGZQQDSSJSE']") WebTools(self.driver).input_content( 'xpath', "//textarea[@xid='ZGZQQDSSJSE']", '50') # 担保范围 WebTools(self.driver).input_clear( 'xpath', "//textarea[@xid='dbfw']") WebTools(self.driver).input_content( 'xpath', "//textarea[@xid='dbfw']", '房屋产权') # 将页面滚动条拖到指定元素(附记) WebTools( self.driver).srollBarToElement("//textarea[@xid='fj']") # 其他 WebTools(self.driver).mouse_click( 'xpath', "//span[@xid='createQT']") # 附记 WebTools(self.driver).mouse_click( 'xpath', "//span[@xid='createFJ']") time.sleep(1) elif qllx == '查封登记': # 预置数据(当前时间(年月日)) currentDate = time.strftime('%Y-%m-%d') # 预置数据(当前时间(年月日时分秒)) currentTime = time.strftime('%Y%m%d-%H%M%S') # 首封类业务 ywlxList = [ '80E93B91E9974F98AAE75C6AD28629B1', # 批量查封(净地和房地) 'A7325035C9E24F7784B50AC1E965FFD7', # 预查封 '7C472DAB0C1D46E1B782689C057B552E', # 批量预售合同查封 '9549D08993DB44138AC1A433A346C3BC', # 土地小证查封 ] # 续查封类业务 ywlxList2 = [ '24A5B1DEA6124BCEA1C38626996BFF97', # 批量续查封登记(净地和房地) '6559D6E5FB7044D3999FBF2EC76A176B', # 批量续预查封 '819B16A603D4467D882268FF9CE83C02', # 土地小证续查封 ] # 司法裁定 ywlxList3 = [ '9AB6783AEDAB4D6CBFF8C7F19D411BE7', # 批量司法裁定(房地) 'EF4D6596ED6347DDA33471FCFA7E973A', # 批量司法裁定(净地) 'AEBFF1F998D846CB932F7CC0ECA0ACAF', # 预告司法裁定(房地) 'EB661D9603EF48E895503BDBC82EADAA', # 预告司法裁定(净地) ] # 首封 if ywlxID in ywlxList: # 查封机关 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'查封机关')]/../td[1]/input[1]", '北京市中级人民法院') # 查封文件名称 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'查封文件名称')]/../td[1]/input[1]", 'xx查封文件') # 查封文号 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'查封文号')]/../td[1]/input[1]", currentTime) # 申请执行人 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'申请执行人')]/../td[1]/input[1]", '张三') # 查封起始日期 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'查封起始日期')]/../td[1]/input[1]", currentDate) # 查封期限 WebTools(self.driver).mouse_click('xpath', "//input[@xid='btnAdd2']") # 来文日期 WebTools(self.driver).input_clear( 'xpath', "//th[contains(text(),'来文日期')]/../td[2]/input[1]") WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'来文日期')]/../td[2]/input[1]", currentDate) # 查封范围 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'查封范围')]/../td[1]/input[1]", "该产权所有,包括附着物(测试)。") # 查封冻结原因 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'查封冻结原因')]/..//textarea[1]", "债务纠纷,依法查封。") # 司法裁定(净地和房屋) elif ywlxID in ywlxList3: # 申请执行人 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'申请执行人')]/../td[1]/input[1]", '张三') # 裁决机关 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'裁决机关')]/../td[1]/input[1]", '北京市中级人民法院') # 裁决文件 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'裁决文件')]/../td[2]/input[1]", 'xx查封文件') # 裁决文号 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'裁决文号')]/../td[1]/input[1]", currentTime) # 来文日期 WebTools(self.driver).input_clear( 'xpath', "//th[contains(text(),'来文日期')]/../td[2]/input[1]") WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'来文日期')]/../td[2]/input[1]", currentDate) # 是否注销抵押(默认是否) if sfdyzx == 1: WebTools(self.driver).mouse_click( 'xpath', "//input[@name='SFZXDY' and @value='1']") # 裁决原因 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'裁决原因')]/..//textarea[1]", "存在和银行的财务纠纷(银行向法院申请查封)") # 续查封 elif ywlxID in ywlxList2: # 申请执行人 WebTools(self.driver).input_clear( 'xpath', "//th[contains(text(),'申请执行人')]/../td[1]/input[1]") WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'申请执行人')]/../td[1]/input[1]", '张三') # 查封起始日期 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'查封起始日期')]/../td[1]/input[1]", currentDate) # 查封期限 WebTools(self.driver).mouse_click('xpath', "//input[@xid='btnAdd2']") # 查封冻结原因 WebTools(self.driver).input_content( 'xpath', "//textarea[@xid='cfdjyy' or @xid='CFDJYY'] ", "查封到期依法执行续查封。") # 解封登记(房屋解封、净地解封、房屋批量解封、净地批量解封) if ywlxID == 'FB265E54DBE24577B2FA4F4C4980AB15' or ywlxID == '08B3B1B8F1FD47188C115939E2814AFF' or ywlxID == '4D22B4174EFD42BCA3C01FE58D9F1477' or ywlxID == '22CF4018956C44338B4A2B51EB1CB111': # 将页面滚动条拖到底部 self.driver.execute_script( "document.documentElement.scrollTop=3000") WebTools(self.driver).check_element_is_exists( 'xpath', "//input[@xid='jfjg']") #解封机关 WebTools(self.driver).input_content('xpath', "//input[@xid='jfjg']", '南京市中级人民法院') #解封文号 WebTools(self.driver).input_content('xpath', "//input[@xid='jfwh']", currentTime) #解封时间 # WebTools(self.driver).input_content('xpath',"//input[@xid='jfsj']",currentDate) #解封原因 WebTools(self.driver).input_content('xpath', "//textarea[@xid='jfyy']", "债务已清,予以解封。") elif qllx == '其他登记': # 预置数据(当前时间(年月日)) currentDate = time.strftime('%Y-%m-%d') # 预置数据(当前时间(年月日时分秒)) currentTime = time.strftime('%Y%m%d-%H%M%S') # 房屋,净地 if ywlxID == 'ACAF8531B13B43FC8CB4D521E46FCA58' or ywlxID == 'C2A770118E79445EB50E0108E1BCA69D': # 冻结机关 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'冻结机关')]/../td[1]/input[1]", '北京市中级人民法院') # 冻结文号 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'冻结文号')]/../td[1]/input[1]", currentTime) # 冻结起始日期 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'冻结起始日期')]/../td[1]/input[1]", currentDate) # 冻结截止日期 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'冻结截止日期')]/../td[2]/input[1]", currentDate) # 来文日期 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'来文日期')]/../td[2]/input[1]", currentDate) # 冻结类型 WebTools(self.driver).mouse_click( 'xpath', "//td[@xid='djxzlxTd']//input[1]") # 冻结原因 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'冻结原因')]/..//textarea[1]", "存在纠纷,予以冻结") elif ywlxID == '009B74A8CD6C42C18B6F2C0F16FAC912' or ywlxID == 'CA64F346B5F74F51918D47FA64A00373': # 解冻机关 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'解冻机关')]/../td[1]/input[1]", '北京市中级人民法院') # 冻结文号 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'解冻文号')]/../td[1]/input[1]", currentTime) # 解冻时间 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'解冻时间')]/../td[2]/input[1]", currentDate) # 解冻原因 WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'解冻原因')]/..//textarea[1]", "纠纷解除,予以解冻") elif qllx == '预告登记': if djlx != '注销登记': # 预抵押 if sfydy: # 预置数据(开始时间) currentDate = time.strftime('%Y-%m-%d', time.localtime(time.time())) # 预置数据(结束时间) fetureDate = time.strftime( '%Y-%m-%d', time.localtime(time.time() + 86400 * 365 * 10)) # 将页面滚动条拖动中间 self.driver.execute_script( "document.documentElement.scrollTop=300") # 抵押方式 WebTools(self.driver).choose_droplist('name', 'DYFS', '1') # 抵押不动产类型 if cqType == 0: WebTools(self.driver).choose_droplist( 'name', 'DYBDCLX', '1') elif cqType == 1: WebTools(self.driver).choose_droplist( 'name', 'DYBDCLX', '2') else: logger.error("产权类型【cqType】未传值,请检查yml文件") sys.exit(-1) # 是否存在禁止或限制转让不动产的约定 WebTools(self.driver).mouse_click( 'xpath', "//input[@name='SFXZZR' and @value='0']") # 不动产价值 WebTools(self.driver).input_clear('xpath', "//input[@xid='dywjz']") WebTools(self.driver).input_content( 'xpath', "//input[@xid='dywjz']", '100') # 被担保主债权数额 WebTools(self.driver).input_clear( 'xpath', "//input[@xid='bdbzqse']") WebTools(self.driver).input_content( 'xpath', "//input[@xid='bdbzqse']", '80') # 抵押合同签订日期 WebTools(self.driver).input_content( 'xpath', "//input[@xid='DYHTQDRQ']", currentDate) # 债务履行起始时间 WebTools(self.driver).input_content( 'xpath', "//input[@xid='zwlxqssj']", currentDate) # 债务履行结束时间 WebTools(self.driver).input_content( 'xpath', "//input[@xid='zwlxjssj']", fetureDate) # 最高债权确定事实和数额 WebTools(self.driver).input_clear( 'xpath', "//textarea[@xid='ZGZQQDSSJSE']") WebTools(self.driver).input_content( 'xpath', "//textarea[@xid='ZGZQQDSSJSE']", '50') # 担保范围 WebTools(self.driver).input_content( 'xpath', "//textarea[@xid='dbfw']", '产权证') # 将页面滚动条拖到附记 WebTools( self.driver).srollBarToElement("//textarea[@xid='fj']") # 其他 WebTools(self.driver).mouse_click( 'xpath', "//span[@xid='createQT']") # 附记 WebTools(self.driver).mouse_click( 'xpath', "//span[@xid='createFJ']") time.sleep(1) # 预告 else: # 商品房预告首次 if ywlxID == '1CEDE7DF7E0F481BB5AF3C8700028F1B': # 预告登记种类 if ywxl == '预售商品房预告登记': WebTools(self.driver).choose_droplist( 'name', 'YGDJZL', '1') elif ywxl == '其它不动产买卖预告登记': WebTools(self.driver).choose_droplist( 'name', 'YGDJZL', '2') # 将页面滚动条拖到底部 self.driver.execute_script( "document.documentElement.scrollTop=3000") # 其他 WebTools(self.driver).mouse_click( 'xpath', "//span[@xid='createQT']") # 附记 WebTools(self.driver).mouse_click( 'xpath', "//span[@xid='createFJ']") time.sleep(1) # 滚动条拖到顶部 self.driver.execute_script("document.documentElement.scrollTop=0") ywlxList = [ 'F49EEFC631414825BD7B93A84F7A355E', # 净地抵押首次 '6DD4B4B44C724FCAAEF3A21BD49E1232', # 不动产抵押 '7FCA6894051F46CDBC603DE0E430D1EA', # 预抵押转现 'BAA801115B3740868F1C8824102CABC7', # 不动产抵押注销 ] # 部分流程提交会出现申请表未保存【规避】 if ywlxID in ywlxList: WebTools(self.driver).mouse_click( 'xpath', '//span[@functionname="saveBtnClick"]') time.sleep(4)
def fzHandle(self, bdcdyh, env): # 将页面滚动条拖到顶部 self.driver.execute_script( "var q = document.documentElement.scrollTop=0") WebTools(self.driver).mouse_doubleClick( 'xpath', "//div[contains(text(),'" + bdcdyh + "')]/../..") WebTools(self.driver).check_element_is_exists( 'xpath', '//span[@xid="editBtn"]') # time.sleep(2) if env == 'sqtest': WebTools(self.driver).mouse_click( 'xpath', '//span[@functionname="commitBtnClick"]') else: WebTools(self.driver).mouse_click('xpath', '//span[@xid="editBtn"]') WebTools(self.driver).choose_droplist('name', 'rylx', '1') WebTools(self.driver).input_content('xpath', '//input[@xid="FZSL"]', 1) WebTools(self.driver).choose_droplist('name', 'lzrzjlb', '3') WebTools(self.driver).input_content('xpath', '//input[@xid="LZRZJHM"]', 121212) WebTools(self.driver).choose_droplist('name', 'lzfs', '1') WebTools(self.driver).mouse_click('xpath', '//span[@xid="saveBtn"]') WebTools(self.driver).mouse_click( 'xpath', '//span[@functionname="commitBtnClick"]') WebTools(self.driver).mouse_click( 'xpath', '//div[@id="applicationHost"]/div[1]/div[2]/div/section[2]/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/div[1]/div[2]/span[2]' ) # 任务流转==>结束 WebTools(self.driver).mouse_click('xpath', "//a[@xid='okBtn']")
def query(self, bdcdyh, data): ''' 流程发起菜单,包括一级菜单、二级菜单、三级菜单 :param bdcdyh 受理件不动产单元号 :param data (dict) :param lcInfo (dict) :param qllx: 权利类型, :param ywlxID: 业务类型ID :param params (dict) :param cqType :产权类型(0-净地,1-房屋) :return: ''' qllx = data.get('initdata').get('lcInfo', None).get('qllx', None) ywlxID = data.get('initdata').get('lcInfo', None).get('ywlxID', None) cqType = data.get('initdata').get('params', None).get('cqType', None) # 查封业务 if qllx == '查封登记': # 批量司法裁定(净地)/预告司法裁定(净地)/批量查封(净地) '''因批量查封净地和房屋为一个接口,同一个ywlxid,只能加上产权类型判断''' if ywlxID == 'EF4D6596ED6347DDA33471FCFA7E973A' or ywlxID == 'EB661D9603EF48E895503BDBC82EADAA' or ( ywlxID == '80E93B91E9974F98AAE75C6AD28629B1' and cqType == 0): WebTools(self.driver).mouse_click('xpath', "//span[@xid='landBtn']") WebTools(self.driver).check_element_is_exists( 'xpath', "//th[contains(text(),'宗地')]/../../..//input[@xid='bdcdyh']" ) WebTools(self.driver).input_content( 'xpath', "//th[contains(text(),'宗地')]/../../..//input[@xid='bdcdyh']", bdcdyh) WebTools(self.driver).mouse_click( 'xpath', "//th[contains(text(),'宗地')]/../../..//span[contains(text(),'查询')]" ) time.sleep(2) WebTools(self.driver).check_element_is_exists( 'xpath', "//table[@xid='resultTable']//tbody/tr[1]") WebTools(self.driver).mouse_click( 'xpath', "//table[@xid='resultTable']//tbody/tr[1]") WebTools(self.driver).mouse_click( 'xpath', "//th[contains(text(),'宗地')]/../../../../../../..//*[@id='confirmBtn']" ) # 批量预售合同查封 elif ywlxID == '7C472DAB0C1D46E1B782689C057B552E': WebTools(self.driver).mouse_click('xpath', "//span[@xid='landBtn']") WebTools(self.driver).check_element_is_exists( 'xpath', "//span[@xid='landBtn']/../../div[3]/div[2]//*[@xid='bdcdyh']" ) WebTools(self.driver).input_content( 'xpath', "//span[@xid='landBtn']/../../div[3]/div[2]//*[@xid='bdcdyh']", bdcdyh) WebTools(self.driver).mouse_click( 'xpath', "//span[@xid='landBtn']/../../div[3]/div[2]//span[contains(text(),'查询')]" ) time.sleep(2) WebTools(self.driver).check_element_is_exists( 'xpath', "//table[@xid='resultTable']//tbody/tr[1]") WebTools(self.driver).mouse_click( 'xpath', "//table[@xid='resultTable']//tbody/tr[1]") WebTools(self.driver).mouse_click( 'xpath', "//span[@xid='landBtn']/../../div[3]/div[2]//span[contains(text(),'确认')]" ) # 通用模板(包括单个流程查询 和批量非净地流程查询) else: WebTools(self.driver).check_element_is_exists( 'xpath', "//input[@xid='bdcdyh']") WebTools(self.driver).input_content('xpath', "//input[@xid='bdcdyh']", bdcdyh) WebTools(self.driver).mouse_click( 'xpath', "//div[@xid='mainContent']//span[contains(text(),'查询')]") time.sleep(2) WebTools(self.driver).mouse_click( 'xpath', "//tbody[@xid='listTemplate1']//*[contains(text(),bdcdyh)]" ) # 滚动条拖到确认位置 self.driver.execute_script( "document.documentElement.scrollTop=300") WebTools(self.driver).mouse_click('id', "confirmBtn") # 非查封业务 else: # 建筑物区分业主共有部分(通过幢不动产单元号查询) if ywlxID == '191B4FB37DD148448BC64944C01A78C1': WebTools(self.driver).check_element_is_exists( 'xpath', "//input[@xid='zbdcdyh']") WebTools(self.driver).input_content('xpath', "//input[@xid='zbdcdyh']", bdcdyh) else: WebTools(self.driver).check_element_is_exists( 'xpath', "//input[@xid='bdcdyh']") WebTools(self.driver).input_content('xpath', "//input[@xid='bdcdyh']", bdcdyh) WebTools(self.driver).mouse_click( 'xpath', "//div[@xid='mainContent']//span[contains(text(),'查询')]") time.sleep(2) WebTools(self.driver).mouse_click( 'xpath', "//table[@xid='resultTable']//tbody/tr[1]") # WebTools(self.driver).mouse_click('id', "confirmBtn") # 分户转移 if ywlxID == 'CD62B1699DEB4496AF8D5D5590E945AB': WebTools(self.driver).mouse_click('xpath', "//div[@xid='confirm']") else: WebTools(self.driver).mouse_click( 'xpath', "//span[contains(text(),'确认')]") # 针对页面点击确定弹出框提示信息,点击确定 WebTools(self.driver).allow_element_is_exists('class_name', 'BeAlert_box')
def chooseNode(self,data): ''' 流程发起菜单,包括一级菜单、二级菜单、三级菜单 :param lcInfo (dict) :param qllx: 权利类型, :param djlx: 登记类型(optional) :param ywlxID: 业务类型ID :return: ''' qllx = data.get('initdata').get('lcInfo', None).get('qllx',None) djlx = data.get('initdata').get('lcInfo', None).get('djlx', None) ywlxID = data.get('initdata').get('lcInfo', None).get('ywlxID', None) if qllx and ywlxID: if qllx == '国有建设用地使用权': if djlx =='首次登记': # 出让用地 if ywlxID == '95EA0C9EDED1481ABB1689213B53DAA0': WebTools(self.driver).mouse_doubleClick('xpath',"//div[@ywlxid='95EA0C9EDED1481ABB1689213B53DAA0']/div[1]") time.sleep(2) elif djlx == '转移登记': WebTools(self.driver).mouse_click('xpath',"//ul[@xid='subUl0']/li[2]/a") time.sleep(2) # 转移登记 if ywlxID == '7F7384BA05614A0B916BCC8E5C667367': WebTools(self.driver).mouse_doubleClick('xpath',"//div[@ywlxid='7F7384BA05614A0B916BCC8E5C667367']/div[1]") time.sleep(2) # 分割合并转移登记 elif ywlxID == '754E1541053249F7B4FFD2F6FD283FC8': WebTools(self.driver).mouse_doubleClick('xpath',"//div[@ywlxid='754E1541053249F7B4FFD2F6FD283FC8']/div[1]") time.sleep(2) # 裁定过户 elif ywlxID == '1FD9E9848E0A4059B39F22116F21BD74': WebTools(self.driver).mouse_doubleClick('xpath',"//div[@ywlxid='1FD9E9848E0A4059B39F22116F21BD74']/div[1]") time.sleep(2) elif djlx == '变更登记': WebTools(self.driver).mouse_click('xpath',"//ul[@xid='subUl0']/li[3]/a") # 名称、地址、用途等变更登记 if ywlxID ==167090000067: WebTools(self.driver).mouse_doubleClick('xpath',"//div[@ywlxid=167090000067]/div[1]") time.sleep(2) # 分割合并变更 elif ywlxID ==167010001542: WebTools(self.driver).mouse_doubleClick('xpath',"//div[@ywlxid=167010001542]/div[1]") time.sleep(2) elif djlx == '注销登记': WebTools(self.driver).mouse_click('xpath',"//ul[@xid='subUl0']/li[4]/a") # 注销登记(01401) if ywlxID =='2D8FCFBFEAD4437EB83E00CA35488581': WebTools(self.driver).mouse_doubleClick('xpath',"//div[@ywlxid='2D8FCFBFEAD4437EB83E00CA35488581']/div[1]") time.sleep(2) elif qllx == '国有建设用地使用权及房屋所有权': WebTools(self.driver).mouse_click('link_text',"国有建设用地使用权及房屋所有权") if djlx =='首次登记': # 房屋首次登记 if ywlxID == 'F711B2126C44409D903254C246FCD569': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='F711B2126C44409D903254C246FCD569']/div[1]") time.sleep(2) # 自建房屋 elif ywlxID == 167090000070: WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid=167090000070]/div[1]") time.sleep(2) # 建筑物区分业主共有部分 elif ywlxID == '191B4FB37DD148448BC64944C01A78C1': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='191B4FB37DD148448BC64944C01A78C1']/div[1]") time.sleep(2) # 车库(位)及其他附属设施 elif ywlxID == 167090000072: WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid=167090000072]/div[1]") time.sleep(2) # 首次登记(批量) elif ywlxID == '91436F614E6F43409B5A8FE2F0290F8F': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='91436F614E6F43409B5A8FE2F0290F8F']/div[1]") time.sleep(2) # 项目内多幢 elif ywlxID == '608286609F5C429CB32BA42C56F7C7F7': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='608286609F5C429CB32BA42C56F7C7F7']/div[1]") time.sleep(2) else: logger.error("%s 业务类型ID不存在!" % ywlxID) elif djlx == '转移登记': WebTools(self.driver).mouse_click('xpath', "//ul[contains(@xid,'subUl1')]/li[2]/a") # 房屋首次转移登记 if ywlxID =='807BD8C295404AA19F2275CB830E5F4C': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='807BD8C295404AA19F2275CB830E5F4C']/div[1]") time.sleep(2) # 存量房转移登记 elif ywlxID =='7CEA3E6E7C9D4D4194F77C2FB71FA0A4': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='7CEA3E6E7C9D4D4194F77C2FB71FA0A4']/div[1]") time.sleep(2) # 房的批量转移 elif ywlxID =='7E9CABA30D4749D499654390D0ED4DDB': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='7E9CABA30D4749D499654390D0ED4DDB']/div[1]") time.sleep(2) # 预告转现 elif ywlxID =='08B6FBC363E745C3ABF0DFDD13ECCD0B': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='08B6FBC363E745C3ABF0DFDD13ECCD0B']/div[1]") time.sleep(2) # 裁定过户(房) elif ywlxID =='E53B3B2C4EE0453D9BCAD57B0107F184': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='E53B3B2C4EE0453D9BCAD57B0107F184']/div[1]") time.sleep(2) # 裁定过户批量(房) elif ywlxID =='BF8570D83B5F4B95A0AD22D9603477D2': time.sleep(2) WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='BF8570D83B5F4B95A0AD22D9603477D2']/div[1]") time.sleep(2) # 分户转移 elif ywlxID =='CD62B1699DEB4496AF8D5D5590E945AB': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='CD62B1699DEB4496AF8D5D5590E945AB']/div[1]") time.sleep(2) elif djlx == '变更登记': pass elif djlx == '注销登记': WebTools(self.driver).mouse_click('xpath', "//ul[contains(@xid,'subUl1')]/li[4]/a") # 房屋首次转移登记(含商品房、经适房、安置房) if ywlxID =='7C936E3656FA459DA3EE2F767A18C62F': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='7C936E3656FA459DA3EE2F767A18C62F']/div[1]") time.sleep(2) else: print("登记类型(%s)不存在!" % self.djlx) elif qllx == '抵押权': WebTools(self.driver).mouse_click('link_text',"抵押权") if djlx =='首次登记': # 土地抵押 if ywlxID == 'F49EEFC631414825BD7B93A84F7A355E': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='F49EEFC631414825BD7B93A84F7A355E']/div[1]") time.sleep(2) # 不动产抵押 elif ywlxID == '6DD4B4B44C724FCAAEF3A21BD49E1232': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='6DD4B4B44C724FCAAEF3A21BD49E1232']/div[1]") time.sleep(2) # 在建房地产 elif ywlxID == '497903B0B8404E60B70C27DB2C7674F7': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='497903B0B8404E60B70C27DB2C7674F7']/div[1]") time.sleep(2) # 批量抵押(房屋) elif ywlxID == '3394FD609E5F4963AC02AAA07619D535': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='3394FD609E5F4963AC02AAA07619D535']/div[1]") time.sleep(2) elif djlx == '转移登记': WebTools(self.driver).mouse_click('xpath', "//ul[contains(@xid,'subUl2')]/li[2]/a") # 土地抵押转移 if ywlxID == '4845AD57E4034D0AAFFA4E3596DAF094': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='4845AD57E4034D0AAFFA4E3596DAF094']/div[1]") time.sleep(2) # 不动产抵押转移 elif ywlxID == '9BAE7B1AC9A0444ABA80C18BFA0F6E59': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='9BAE7B1AC9A0444ABA80C18BFA0F6E59']/div[1]") time.sleep(2) # 在建房地产转移 elif ywlxID == 'A0A08B5E60DB461992702483F5D49FA0': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='A0A08B5E60DB461992702483F5D49FA0']/div[1]") time.sleep(2) # 预抵押转现 elif ywlxID == '7FCA6894051F46CDBC603DE0E430D1EA': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='7FCA6894051F46CDBC603DE0E430D1EA']/div[1]") time.sleep(2) elif djlx == '变更登记': WebTools(self.driver).mouse_click('xpath', "//ul[contains(@xid,'subUl2')]/li[3]/a") # 批量抵押变更 if ywlxID == 'B99F96081EE34064A11CD70B389CA019': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='B99F96081EE34064A11CD70B389CA019']/div[1]") time.sleep(2) else: WebTools(self.driver).mouse_click('xpath', "//ul[contains(@xid,'subUl2')]/li[4]/a") # 不动产抵押注销 if ywlxID == 'BAA801115B3740868F1C8824102CABC7': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='BAA801115B3740868F1C8824102CABC7']/div[1]") time.sleep(2) # 土地抵押注销 elif ywlxID == '68C62564D96242D5BED0619ED51A0CCC': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='68C62564D96242D5BED0619ED51A0CCC']/div[1]") time.sleep(2) elif qllx == '查封登记': WebTools(self.driver).mouse_click('link_text', "查封登记") if djlx == '查封': # 批量查封 if ywlxID == '80E93B91E9974F98AAE75C6AD28629B1': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='80E93B91E9974F98AAE75C6AD28629B1']/div[1]") time.sleep(2) # 批量续查封 elif ywlxID == '24A5B1DEA6124BCEA1C38626996BFF97': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='24A5B1DEA6124BCEA1C38626996BFF97']/div[1]") time.sleep(2) # 土地小证查封 elif ywlxID == '9549D08993DB44138AC1A433A346C3BC': WebTools(self.driver).mouse_doubleClick('xpath',"//div[@ywlxid='9549D08993DB44138AC1A433A346C3BC']/div[1]") time.sleep(2) # 土地小证续查封 elif ywlxID == '819B16A603D4467D882268FF9CE83C02': WebTools(self.driver).mouse_doubleClick('xpath',"//div[@ywlxid='819B16A603D4467D882268FF9CE83C02']/div[1]") time.sleep(2) elif djlx == '预查封': WebTools(self.driver).mouse_click('xpath', "//ul[contains(@xid,'subUl3')]/li[2]/a") # 预查封(房屋)/批量预售合同查封 if ywlxID == 'A7325035C9E24F7784B50AC1E965FFD7' or ywlxID == '7C472DAB0C1D46E1B782689C057B552E': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='A7325035C9E24F7784B50AC1E965FFD7']/div[1]") time.sleep(2) # 批量续预查封 if ywlxID == '6559D6E5FB7044D3999FBF2EC76A176B': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='6559D6E5FB7044D3999FBF2EC76A176B']/div[1]") time.sleep(2) elif djlx == '解封': WebTools(self.driver).mouse_click('xpath', "//ul[contains(@xid,'subUl3')]/li[5]/a") # 批量解封(净地和房地) if ywlxID == '4D22B4174EFD42BCA3C01FE58D9F1477': WebTools(self.driver).mouse_doubleClick('xpath',"//div[@ywlxid='4D22B4174EFD42BCA3C01FE58D9F1477']/div[1]") time.sleep(2) # 批量预解封(房屋) elif ywlxID == '86C66F51F4AB420BBA75221E3B0A7C82': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='4D22B4174EFD42BCA3C01FE58D9F1477']/div[1]") time.sleep(2) # 土地小证解封 elif ywlxID == '14B63357509C48C794A471AD88C0531E': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='14B63357509C48C794A471AD88C0531E']/div[1]") time.sleep(2) # 在建工程解封 elif ywlxID == 'B489BA1B6E48483EBF1375D877DDE4F4': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='B489BA1B6E48483EBF1375D877DDE4F4']/div[1]") time.sleep(2) elif djlx == '司法裁定': WebTools(self.driver).mouse_click('xpath', "//ul[contains(@xid,'subUl3')]/li[4]/a") # 批量司法裁定(房和地) if ywlxID == '9AB6783AEDAB4D6CBFF8C7F19D411BE7' or ywlxID == 'EF4D6596ED6347DDA33471FCFA7E973A' : WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='9AB6783AEDAB4D6CBFF8C7F19D411BE7']/div[1]") time.sleep(2) # 预告批量司法裁定(房和地) elif ywlxID == 'AEBFF1F998D846CB932F7CC0ECA0ACAF' or ywlxID == 'EB661D9603EF48E895503BDBC82EADAA': WebTools(self.driver).mouse_doubleClick('xpath',"//div[@ywlxid='AEBFF1F998D846CB932F7CC0ECA0ACAF']/div[1]") time.sleep(2) elif djlx == '在建工程查封': WebTools(self.driver).mouse_click('xpath', "//ul[contains(@xid,'subUl3')]/li[3]/a") pass elif qllx == '其他登记': WebTools(self.driver).mouse_click('link_text', "其他登记") # 冻结登记(房和地) if ywlxID == 'ACAF8531B13B43FC8CB4D521E46FCA58' or ywlxID == 'C2A770118E79445EB50E0108E1BCA69D' : WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='ACAF8531B13B43FC8CB4D521E46FCA58']/div[1]") time.sleep(2) # 解冻登记(房和地) elif ywlxID == '009B74A8CD6C42C18B6F2C0F16FAC912' or ywlxID == 'CA64F346B5F74F51918D47FA64A00373': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='009B74A8CD6C42C18B6F2C0F16FAC912']/div[1]") time.sleep(2) elif qllx == '预告登记': WebTools(self.driver).mouse_click('link_text', "预告登记") if djlx =='首次登记': # 商品房预告 if ywlxID == '1CEDE7DF7E0F481BB5AF3C8700028F1B': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='1CEDE7DF7E0F481BB5AF3C8700028F1B']/div[1]") time.sleep(2) # 商品房预告抵押 elif ywlxID == 'F92E0A9F7CC8429C862DE095D6A04AD4': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='F92E0A9F7CC8429C862DE095D6A04AD4']/div[1]") time.sleep(2) # 净地预告 if ywlxID == '4AD2511CA0E14212AFD604CE806B1E9A': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='4AD2511CA0E14212AFD604CE806B1E9A']/div[1]") time.sleep(2) elif djlx == '转移登记': WebTools(self.driver).mouse_click('xpath', "//ul[contains(@xid,'subUl5')]/li[2]/a") elif djlx == '变更登记': WebTools(self.driver).mouse_click('xpath', "//ul[contains(@xid,'subUl5')]/li[3]/a") else: WebTools(self.driver).mouse_click('xpath', "//ul[contains(@xid,'subUl5')]/li[4]/a") # 房地预告注销 if ywlxID == '8546EB5B8816468B898874A37637D08E': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='8546EB5B8816468B898874A37637D08E']/div[1]") time.sleep(2) # 预告抵押注销 elif ywlxID == 'C956D29C47DE4699AD31A620F82961EC': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='C956D29C47DE4699AD31A620F82961EC']/div[1]") time.sleep(2) # 净地预告注销 elif ywlxID == '48F888726F514BB5B19ED79663D5CCBE': WebTools(self.driver).mouse_doubleClick('xpath', "//div[@ywlxid='48F888726F514BB5B19ED79663D5CCBE']/div[1]") time.sleep(2) else: logger.error("权利类型和业务类型ID参数必填。")
def sqrqkHandle(self,data): ''' 封装流程受理(申请人情况) :param data (dict) :param lcInfo (dict) :param qllx: 权利类型, :param djlx: 登记类型(optional) :param ywlxID: 业务类型ID :return: ''' qllx = data.get('initdata').get('lcInfo',None).get('qllx',None) djlx = data.get('initdata').get('lcInfo', None).get('djlx', None) ywlxID = data.get('initdata').get('lcInfo', None).get('ywlxID', None) sfydy = data.get('initdata').get('params', None).get('sfydy', None) WebTools(self.driver).check_element_is_exists('link_text','申请人情况') WebTools(self.driver).mouse_click('link_text', '申请人情况') # 将页面滚动条拖到顶部 self.driver.execute_script("document.documentElement.scrollTop=0") WebTools(self.driver).check_element_is_exists('xpath',"//th[contains(text(),'是否通知人')]") # 动态获取权利人数据 qlrmc = generateQLRName() dyQlrmc = generateDYQLRName() qlrzjhm = generateCertNum() qlrdhhm = generateTelnum() qlrtxdz = generateAddr() if qllx =='国有建设用地使用权' or qllx == '国有建设用地使用权及房屋所有权': if djlx == '首次登记': WebTools(self.driver).mouse_click('xpath', "//div[contains(text(),'申请人信息')]/..//*[contains(text(),'新增')]") time.sleep(1) # 姓名 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRMC']", qlrmc) # 是否通知 WebTools(self.driver).mouse_click('name', 'SFTZR') # 证件类型 WebTools(self.driver).choose_droplist('name', 'SQRZJZL', '3') # 证件号码 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRZJH']", qlrzjhm) # 电话 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRDHHM']", qlrdhhm) # 通讯地址 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRTXDZ']", qlrtxdz) # 共有方式 WebTools(self.driver).choose_droplist('name', 'GYFS', '1') elif djlx == '转移登记': # 预转现,裁定过户(地),裁定过户批量(地),裁定过户(房),裁定过户批量(房 ) qlrlist=[ '08B6FBC363E745C3ABF0DFDD13ECCD0B', '1FD9E9848E0A4059B39F22116F21BD74', '1652988554BE4119B4B86334F18552AF', 'E53B3B2C4EE0453D9BCAD57B0107F184', 'BF8570D83B5F4B95A0AD22D9603477D2' ] if ywlxID in qlrlist: WebTools(self.driver).check_element_is_exists('xpath', "//table[@xid='underTable']/tbody/tr[1]/td[9]//span[contains(text(),'编辑')]") WebTools(self.driver).mouse_click('xpath', "//table[@xid='underTable']/tbody/tr[1]/td[9]//span[contains(text(),'编辑')]") time.sleep(1) # 是否通知 WebTools(self.driver).mouse_click('name', 'SFTZR') # 证件类型 WebTools(self.driver).choose_droplist('name', 'SQRZJZL', '3') # 证件号码 WebTools(self.driver).input_clear('xpath', "//input[@xid='SQRZJH']") WebTools(self.driver).input_content('xpath', "//input[@xid='SQRZJH']", qlrzjhm) # 电话 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRDHHM']", qlrdhhm) else: WebTools(self.driver).check_element_is_exists('xpath', "//div[contains(text(),'权利人列表')]/../div[2]/span[3]") time.sleep(2) WebTools(self.driver).mouse_click('xpath', "//div[contains(text(),'权利人列表')]/../div[2]/span[3]") time.sleep(1) # 姓名 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRMC']", qlrmc) # 是否通知 WebTools(self.driver).mouse_click('name', 'SFTZR') # 证件类型 WebTools(self.driver).choose_droplist('name','SQRZJZL','4') # 证件号码 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRZJH']", qlrzjhm) # 电话 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRDHHM']", qlrdhhm) # 通讯地址 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRTXDZ']", qlrtxdz) # 共有方式 WebTools(self.driver).choose_droplist('name', 'GYFS', '0') elif qllx == '抵押权': if djlx == '首次登记': # 在建工程抵押首次 if ywlxID == 167090000093: # 打印当前操作界面的句柄 current_handle = self.driver.current_window_handle print('current_handle', current_handle) # 获取当前打开页的所有句柄并打印,应该只有一个 all_handles = self.driver.window_handles print('all_handles', all_handles) # 新增预告抵押人 WebTools(self.driver).mouse_click('xpath', "//div[contains(text(),'预告抵押人列表')]/../div[2]/span[1]") time.sleep(4) # 强制等待2秒 # 获取进入新窗口后所有的句柄,并打印当前所有的句柄,此次应该有两个了 all_handles2 = self.driver.window_handles print('all_handles2', all_handles2) self.driver.implicitly_wait(2) # 拿到新窗口句柄 newhandle = [handle for handle in all_handles2 if handle not in all_handles] # 打印新窗口 print('newhandle', newhandle[0]) # 切换到新窗口 self.driver.switch_to.window(newhandle[0]) time.sleep(2) # 打印新窗口的title print('新窗口的title:', self.driver.title) # WebTools(self.driver).current_handle() # 姓名 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRMC']", '绿地中国地产开发有限公司') # 证件类型 WebTools(self.driver).choose_droplist('name', 'SQRZJZL', '3') # 证件号码 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRZJH']", '999999999991N') # 保存 # # 新增预告抵押权人 # WebTools(self.driver).mouse_click('xpath', "//div[contains(text(),'预告抵押权人列表')]/../div[2]/span[2]") # # 姓名 # WebTools(self.driver).input_content('xpath', "//input[@xid='SQRMC']", qlrmc) # # 证件类型 # WebTools(self.driver).choose_droplist_value('SQRZJZL', 'xpath', "//select[@name='SQRZJZL']/option[8]") # # 证件号码 # WebTools(self.driver).input_content('xpath', "//input[@xid='SQRZJH']", qlrzjhm) else: # 将页面滚动条拖到指定元素(抵押权人列表) WebTools(self.driver).srollBarToElement("//*[contains(text(),'抵押权人列表')]") WebTools(self.driver).check_element_is_exists('xpath', "//div[contains(text(),'抵押权人列表')]/../div[2]/span[3]") WebTools(self.driver).mouse_click('xpath','//table[@xid="underTable"]//span[contains(text(),"新增")]') time.sleep(1) # 姓名 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRMC']", dyQlrmc) # 是否通知 WebTools(self.driver).mouse_click('name', 'SFTZR') # 证件类型 WebTools(self.driver).choose_droplist('name', 'SQRZJZL', '3') # 证件号码 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRZJH']", qlrzjhm) # 电话 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRDHHM']", qlrdhhm) # 共有方式 WebTools(self.driver).choose_droplist('name', 'GYFS', '1') # 通讯地址 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRTXDZ']", qlrtxdz) elif djlx =='转移登记': # 预抵押转现 if ywlxID == '7FCA6894051F46CDBC603DE0E430D1EA': WebTools(self.driver).mouse_click('xpath',"//table[contains(@xid,'underTable')]//span[contains(text(),'编辑')]") # 将页面滚动条拖到指定元素(登记原因) WebTools(self.driver).srollBarToElement("//input[@xid='ZJYXQ']") # 是否通知 WebTools(self.driver).mouse_click('name', 'SFTZR') # 电话 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRDHHM']", qlrdhhm) else: self.driver.execute_script("document.documentElement.scrollTop=250") WebTools(self.driver).check_element_is_exists('xpath',"//div[contains(text(),'抵押权人列表')]/../div[2]/span[3]") WebTools(self.driver).mouse_click('xpath','//table[@xid="underTable"]//span[contains(text(),"新增")]') time.sleep(1) # 姓名 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRMC']", dyQlrmc) # 是否通知 WebTools(self.driver).mouse_click('name', 'SFTZR') # 证件类型 WebTools(self.driver).choose_droplist('name', 'SQRZJZL', '3') # 证件号码 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRZJH']", qlrzjhm) # 电话 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRDHHM']", qlrdhhm) # 共有方式 WebTools(self.driver).choose_droplist('name', 'GYFS', '1') # 通讯地址 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRTXDZ']", qlrtxdz) elif djlx == '变更登记': WebTools(self.driver).mouse_click('xpath', "//table[contains(@xid,'underTable')]//tr[1]/td[9]//span[1]") self.driver.execute_script("document.documentElement.scrollTop=250") time.sleep(1) # 是否通知 WebTools(self.driver).mouse_click('name', 'SFTZR') # 电话 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRDHHM']", qlrdhhm) # 在建房地产 else: pass elif qllx == '预告登记': if djlx == '首次登记': # 预告和预抵义务人操作 # if ywlxID == 167090000093: # # 打印当前操作界面的句柄 # current_handle = self.driver.current_window_handle # print('current_handle', current_handle) # # 获取当前打开页的所有句柄并打印,应该只有一个 # all_handles = self.driver.window_handles # print('all_handles', all_handles) # # # 新增预告抵押人 # WebTools(self.driver).mouse_click('xpath', "//div[contains(text(),'预告抵押人列表')]/../div[2]/span[1]") # time.sleep(4) # 强制等待2秒 # # # 获取进入新窗口后所有的句柄,并打印当前所有的句柄,此次应该有两个了 # all_handles2 = self.driver.window_handles # print('all_handles2', all_handles2) # self.driver.implicitly_wait(2) # # # 拿到新窗口句柄 # newhandle = [handle for handle in all_handles2 if handle not in all_handles] # # 打印新窗口 # print('newhandle', newhandle[0]) # # 切换到新窗口 # self.driver.switch_to.window(newhandle[0]) # time.sleep(2) # # 打印新窗口的title # print('新窗口的title:', self.driver.title) # # # WebTools(self.driver).current_handle() # # 姓名 # WebTools(self.driver).input_content('xpath', "//input[@xid='SQRMC']", '绿地中国地产开发有限公司') # # 证件类型 # WebTools(self.driver).choose_droplist_value('SQRZJZL', 'xpath', "//select[@name='SQRZJZL']/option[8]") # # 证件号码 # WebTools(self.driver).input_content('xpath', "//input[@xid='SQRZJH']", '999999999991N') # # 保存 # # # 新增预告抵押权人 # # WebTools(self.driver).mouse_click('xpath', "//div[contains(text(),'预告抵押权人列表')]/../div[2]/span[2]") # # # 姓名 # # WebTools(self.driver).input_content('xpath', "//input[@xid='SQRMC']", qlrmc) # # # 证件类型 # # WebTools(self.driver).choose_droplist_value('SQRZJZL', 'xpath', "//select[@name='SQRZJZL']/option[8]") # # # 证件号码 # # WebTools(self.driver).input_content('xpath', "//input[@xid='SQRZJH']", qlrzjhm) # 预抵押 if sfydy == 1: self.driver.execute_script("document.documentElement.scrollTop=250") WebTools(self.driver).check_element_is_exists('xpath',"//div[contains(text(),'抵押权人列表')]/../div[2]/span[3]") WebTools(self.driver).mouse_click('xpath', '//table[@xid="underTable"]//span[contains(text(),"新增")]') time.sleep(1) # 姓名 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRMC']", dyQlrmc) # 预告 else: WebTools(self.driver).check_element_is_exists('xpath',"//div[contains(text(),'预告权利人列表')]/../div[2]/span[3]") WebTools(self.driver).mouse_click('xpath', '//table[@xid="underTable"]//span[contains(text(),"新增")]') time.sleep(1) # 姓名 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRMC']", qlrmc) # 是否通知 WebTools(self.driver).mouse_click('name', 'SFTZR') # 证件类型 WebTools(self.driver).choose_droplist('name', 'SQRZJZL', '3') # 证件号码 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRZJH']", qlrzjhm) # 电话 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRDHHM']", qlrdhhm) # 共有方式 WebTools(self.driver).choose_droplist('name', 'GYFS', '1') # 通讯地址 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRTXDZ']", qlrtxdz) else: pass elif qllx == '查封登记': if djlx == '司法裁定': WebTools(self.driver).mouse_click('xpath', "//div[contains(text(),'申请人信息')]/..//span[contains(text(),'新增')]") time.sleep(1) # 姓名 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRMC']", qlrmc) # 是否通知 WebTools(self.driver).mouse_click('name', 'SFTZR') # 证件类型 WebTools(self.driver).choose_droplist('name', 'SQRZJZL', '3') # 证件号码 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRZJH']", qlrzjhm) # 电话 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRDHHM']", qlrdhhm) # 通讯地址 WebTools(self.driver).input_content('xpath', "//input[@xid='SQRTXDZ']", qlrtxdz) # 共有方式 WebTools(self.driver).choose_droplist('name', 'GYFS', '1') # 公共操作 if djlx != '注销登记': # 将页面滚动条拖到顶部 self.driver.execute_script("document.documentElement.scrollTop=50") time.sleep(1) # 保存 WebTools(self.driver).mouse_click('xpath', "//span[@xid='saveBtn']") # 校验保存按钮点击后页面弹出框 WebTools(self.driver).allow_element_is_exists('class_name', 'BeAlert_box')
def blyjHandle(self): WebTools(self.driver).check_element_is_exists('link_text', '办理意见') WebTools(self.driver).mouse_click('link_text', '办理意见') WebTools(self.driver).input_content('xpath', "//textarea[@xid='currentShyj']", '受理同意')
def bdcjbxxHandle(self, data, *args): ''' 封装不动产基本信息页面 :param data (dict) :param lcInfo (dict) :param qllx: 权利类型, :param djlx: 登记类型(optional) :param ywlxID: 业务类型ID :return: ''' qllx = data.get('initdata').get('lcInfo', None).get('qllx', None) djlx = data.get('initdata').get('lcInfo', None).get('djlx', None) ywlxID = data.get('initdata').get('lcInfo', None).get('ywlxID', None) sfpl = data.get('initdata').get('params', None).get('sfpl', None) cqType = data.get('initdata').get('params', None).get('cqType', None) WebTools(self.driver).check_element_is_exists('link_text', '不动产基本信息') WebTools(self.driver).mouse_click('link_text', '不动产基本信息') # 等待页面元素加载 # 批量 if sfpl == 1: WebTools(self.driver).check_element_is_exists( 'xpath', "//div[@xid='headTitle']") #建筑物区分业主共有部分 需特别处理,属于批量流程,但yml中sfpl参数不赋值,因为涉及到数据查询。 elif ywlxID == '191B4FB37DD148448BC64944C01A78C1': WebTools(self.driver).check_element_is_exists( 'xpath', "//div[@xid='headTitle']") # 非批量 else: if cqType == 0: WebTools(self.driver).check_element_is_exists( 'xpath', "//span[contains(text(),'土地信息')]") elif cqType == 1: WebTools(self.driver).check_element_is_exists( 'xpath', "//span[contains(text(),'不动产信息')]") else: logger.error("产权类型【cqType】未传值,请检查yml文件") sys.exit(-1) if qllx == '国有建设用地使用权及房屋所有权': # 分户转移 if ywlxID == 'CD62B1699DEB4496AF8D5D5590E945AB': # 因为该流程区别于其他流程,在不动产基本信息页面查询入参数据,需要参数bdcdyh;且待登记数据需要分配权利人,所以需要计算待登记数据条数,需要参数fsssxxCount bdcdyh = args[0] fsssxxCount = args[1] logger.debug("args第一个参数值(bdcdyh)为:%s" % bdcdyh) logger.debug("args第二个参数值(dj_fsssxx条数)为:%s" % fsssxxCount) WebTools(self.driver).check_element_is_exists( 'xpath', "//*[contains(text(),'待登记不动产单元')]") WebTools(self.driver).mouse_click( 'xpath', "//*[contains(text(),'待登记不动产单元')]/../..//*[contains(text(),'新增')]" ) # 调用不动产单元查询功能 queryFunc(self.driver).query(bdcdyh, data) # WebTools(self.driver).allow_element_is_exists('class_name', 'BeAlert_box') for i in range(fsssxxCount): # 分配权利人 i += 1 WebTools(self.driver).mouse_click( 'xpath', "//table[@xid='table3']//tbody/tr[" + str(i) + "]/td[1]/div[2]") WebTools(self.driver).check_element_is_exists( 'xpath', "//input[@xid='SFCZ0']") WebTools(self.driver).mouse_click( 'xpath', "//div[@xid='_compose_splitQlrDialog_']//*[@xid='confirm']" ) WebTools(self.driver).allow_element_is_exists( 'class_name', 'BeAlert_box') # 批量转移,建筑物区分业主共有部分 elif ywlxID == '7E9CABA30D4749D499654390D0ED4DDB' or ywlxID == '191B4FB37DD148448BC64944C01A78C1': pass # 项目类多幢 elif ywlxID == '608286609F5C429CB32BA42C56F7C7F7': # 新增 bdcdyh = args[0] logger.debug("args第一个参数值(bdcdyh)为:%s" % bdcdyh) WebTools(self.driver).check_element_is_exists( 'xpath', "//span[@xid='insert']") WebTools(self.driver).mouse_click('xpath', "//span[@xid='insert']") # 调用不动产单元查询功能 queryFunc(self.driver).bdcjbxxQuery(bdcdyh, data) # 批量生成附记 # WebTools(self.driver).check_element_is_exists('xpath',"//span[@xid='generate']") # WebTools(self.driver).mouse_click('xpath',"//span[@xid='generate']") else: WebTools(self.driver).input_clear('xpath', '//input[@xid="QDJG"]') WebTools(self.driver).input_content('xpath', '//input[@xid="QDJG"]', 80) elif qllx == '国有建设用地使用权': WebTools(self.driver).check_element_is_exists( 'xpath', '//td[@xid="TDQLXZ"]')