#DesignSharePage.py
###设计工程,派单改造交房
# -*- coding:utf8 -*- from base.Base import Base from base import Page from selenium.webdrivermon.by import By from base import SQL import time from base.Base import log from base.Base import consoleLogclass DesignSharePage(Base):searchMould = {'contract_num_loc' : (By.ID,'contract_num_search'), 'search_btn_loc' : (By.ID,'search_btn_share'), 'tr_contract' : (By.CSS_SELECTOR,'tr[datagrid-row-index="0"]')}designShareMould = {#操作按钮 'design_btn':(By.CSS_SELECTOR,"[οnclick='ShareIndex.dialog("workBlank",0)']"), #分割户型:index=0右侧、1右键 'design_btn_1': (By.CSS_SELECTOR,"[οnclick='ShareIndex.dialog("sendOrder",0)']"), #派单:index=0右侧、1右键 'design_btn_2': (By.CSS_SELECTOR,"[οnclick='ShareIndex.dialog("closingRoom",0)']"), #交房:index=0右侧、1右键 #公共区域房东配置 'an_electric_appliance_btn': (By.CSS_SELECTOR,'#publicLandlordElectricConfiguration > input:nth-child(1)'),#电器全选 'kitchen_and_toilet_btn': (By.CSS_SELECTOR, '#publicLandlordKitchenBathConfiguration > input:nth-child(1)'),#厨卫全选 'home_furnishing_btn': (By.CSS_SELECTOR, '#publicLandlordHouseHomeConfiguration > input:nth-child(1)'),#家居全选 #新增房间 'add_house_btn': (By.CSS_SELECTOR,'#design_share_panel > div:nth-child(7) > div > div > a'),#新增房间 'room_area' : (By.CSS_SELECTOR,'#room_area + span > input'),#面积 'houseRoomFunc': (By.CSS_SELECTOR, '# houseRoomFunc > input:nth-child(1)'), # 房间附间 'an_electric_appliance_btn_l': (By.CSS_SELECTOR, '#roomLandlordElectricConfiguration > input:nth-child(1)'), # 电器全选 'home_furnishing_btn_l': (By.CSS_SELECTOR, '#roomLandlordHouseHomeConfiguration > input[type="checkbox"]:nth-child(1)'), #家居全选 'save_btn' : (By.ID,'form_btn_workBlank'), #保存 #派单界面 'save_btn_1': (By.ID, 'send_order_form_btn'), # 保存 #交房界面 'total_cost': (By.CSS_SELECTOR,'#total_cost + span > input'),#装修总成本 'save_btn_2': (By.ID,'closing_room_form_btn'),#保存 }typeMould = {'fitment_style' : '#fitment_style ',#装修风格 'room_no' : '#room_no ',#房号 'room_orientation' : '#room_orientation ',#朝向 'fitment_uid' : '#fitment_uid ',#施工专员 'decorate_start_date' : '#decorate_start_date ',#装修开工日 'hard_delivery_date' : '#hard_delivery_date ', #硬装交付日 'set_delivery_date' : '#set_delivery_date ', #整套交付日 }@log def designhouse(self):"""品牌合租公寓设计装修""" self.open(Page.designSharePage, self.searchMould['tr_contract'], havaFrame=False)self.input_text(self.searchMould['contract_num_loc'],'AutoTest')self.click(self.searchMould['search_btn_loc'])self.staleness_of(self.searchMould['tr_contract'])t_click(self.searchMould['tr_contract'])self.click(self.designShareMould['design_btn'],index=0)#分割户型 self.click(self.designShareMould['an_electric_appliance_btn'])pe_peMould['fitment_style'],'SIMPLECHINESE')self.click(self.designShareMould['kitchen_and_toilet_btn'])self.click(self.designShareMould['home_furnishing_btn'])self.click(self.designShareMould['add_house_btn'])pe_peMould['room_no'],'METH')self.input_text(self.designShareMould['room_area'],'50')pe_peMould['room_orientation'],'NORTH')self.click(self.designShareMould['an_electric_appliance_btn_l'])self.click(self.designShareMould['home_furnishing_btn_l'])self.click(self.designShareMould['save_btn'])self.check_submit()#派单 t_click(self.searchMould['tr_contract'])self.click(self.designShareMould['design_btn_1'], index=0)self.wait_element(self.designShareMould['save_btn_1'])uid = SQL.serach("SELECT su.user_id FROM sys_user su, sys_position sp WHERE su.position_id = sp.position_id AND su.user_status = 'INCUMBENCY' AND sp.position_name LIKE '%品牌公寓专员%' LIMIT 1")pe_peMould['fitment_uid'],uid)time.sleep(1)self.click(self.designShareMould['save_btn_1'])self.check_submit()#交房 t_click(self.searchMould['tr_contract'])self.click(self.designShareMould['design_btn_2'], index=0)self.input_text(self.designShareMould['total_cost'], '5000.00')pe_peMould['decorate_start_date'],'2017-01-01')pe_peMould['hard_delivery_date'],'2017-01-15')pe_peMould['set_delivery_date'],'2017-01-20')self.click(self.designShareMould['save_btn_2'])self.check_submit()Base.succeed += 1 consoleLog('设计装修成功')try:self.solr('apartment',st)consoleLog('apartment-core增量成功')except:ssage,level='ERROR')consoleLog('执行solr增量出现问题,请查看solr是否正常',level='ERROR')
本文发布于:2024-02-05 02:41:05,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170722114362271.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |