def page_factory(self): """ 初始化页面控件 """ # 2端统一的控件 name_list = ['login_button', 'user_name', 'password', 'long_task'] ele_dic = page_element_factory(self.xml_file, name_list) self.login_button_locator = ele_dic['login_button'] self.user_name_locator = ele_dic['user_name'] self.password_locator = ele_dic['password'] self.long_task_locator = ele_dic['long_task'] # IOS独立的控件 if self.is_run_ios(): name_list = ['bound', 'manage_authorize'] ele_dic = page_element_factory(self.xml_file, name_list) self.bound_locator = ele_dic['bound'] self.manage_authorize_locator = ele_dic['manage_authorize'] # Android独立的控件 if not self.is_run_ios(): name_list = [ 'circle_progress_view', 'card_layout', 'show_home', 'order_button' ] ele_dic = page_element_factory(self.xml_file, name_list) self.circle_progress_view_locator = ele_dic['circle_progress_view'] self.card_layout_locator = ele_dic['card_layout'] self.show_home_locator = ele_dic['show_home'] self.order_button_locator = ele_dic['order_button']
def page_factory(self): # iOS and Android端统一的控件 name_list = [ 'choose_warehouse', 'choose_warehouse_confirmBtn', 'enter_station_name', 'choose_type', 'next', 'completed_look', 'nextAdd' ] ele_dic = page_element_factory(self.xml_file, name_list) self.choose_warehouse_locator = ele_dic[ 'choose_warehouse'] # 选择需要操作的仓库 self.choose_warehouse_confirmBtn_locator = ele_dic[ 'choose_warehouse_confirmBtn'] # 选择仓库确认 self.enter_station_name_locator = ele_dic[ 'enter_station_name'] # 输入作业点名称 self.choose_type_locator = ele_dic['choose_type'] # 请选择类型 self.next_locator = ele_dic['next'] # 下一步 self.completed_look_locator = ele_dic['completed_look'] # 完成并查看 self.nextAdd_locator = ele_dic['nextAdd'] # 新增下一个 # IOS独立的控件 if self.is_run_ios(): name_list = [] ele_dic = page_element_factory(self.xml_file, name_list) # Android独立的控件 if not self.is_run_ios(): name_list = ['more_button'] ele_dic = page_element_factory(self.xml_file, name_list) # 左上角更多按钮 self._locator = ele_dic['']
def page_factory(self): """ 初始化页面控件 """ # 2端统一的控件 # name_list = ['login_button', 'user_name', 'password'] # ele_dic = page_element_factory(self.xml_file, name_list) # self.login_button_locator = ele_dic['login_button'] # self.user_name_locator = ele_dic['user_name'] # self.password_locator = ele_dic['password'] # IOS独立的控件 if self.is_run_ios(): name_list = ['bound', 'long_task', 'manage_authorize'] ele_dic = page_element_factory(self.xml_file, name_list) self.bound_locator = ele_dic['bound'] self.long_task_locator = ele_dic['long_task'] self.manage_authorize_locator = ele_dic['manage_authorize'] # Android独立的控件 if not self.is_run_ios(): print(' # Android独立的控件') name_list = ['my_monney', 'notify', 'setting', 'logout'] ele_dic = page_element_factory(self.xml_file, name_list) # 钱仓 self.my_monney_locator = ele_dic['my_monney'] # 通知 self.notify_locator = ele_dic['notify'] # 设置 self.setting_locator = ele_dic['setting'] # 注销 self.logout_locator = ele_dic['logout']
def page_factory(self): """ 初始化页面控件 """ # 2端统一的控件 # name_list = ['login_button', 'user_name', 'password'] # ele_dic = page_element_factory(self.xml_file, name_list) # self.login_button_locator = ele_dic['login_button'] # self.user_name_locator = ele_dic['user_name'] # self.password_locator = ele_dic['password'] # IOS独立的控件 if self.is_run_ios(): name_list = ['bound', 'long_task', 'manage_authorize'] ele_dic = page_element_factory(self.xml_file, name_list) self.bound_locator = ele_dic['bound'] self.long_task_locator = ele_dic['long_task'] self.manage_authorize_locator = ele_dic['manage_authorize'] # Android独立的控件 if not self.is_run_ios(): name_list = ['more_button', 'long_task'] ele_dic = page_element_factory(self.xml_file, name_list) self.more_button_locator = ele_dic['more_button'] # xx左上角更多按钮 self.long_task_locator = ele_dic['long_task'] # xx个长期任务
def page_factory(self): # iOS and Android端统一的控件 name_list = [ 'supplier', 'needs', 'invoice_number', 'destination', 'ship_date', 'confirm', 'upload_file' ] ele_dic = page_element_factory(self.xml_file, name_list) self.supplier_locator = ele_dic['supplier'] # 供方 self.needs_locator = ele_dic['needs'] # 需方 self.invoice_number_locator = ele_dic['invoice_number'] # 发货单号 self.destination_locator = ele_dic['destination'] # 到货仓库 self.ship_date_locator = ele_dic['ship_date'] # 到货日期确认 self.confirm_locator = ele_dic['confirm'] # 确定 self.upload_file_locator = ele_dic['upload_file'] # PC端导入 # IOS独立的控件 if self.is_run_ios(): name_list = ['needs_unit', 'upDelivery_order', 'completeBtn'] ele_dic = page_element_factory(self.xml_file, name_list) self.needs_unit_locator = ele_dic['needs_unit'] # 需方单位 self.upDelivery_order_locator = ele_dic[ 'upDelivery_order'] # 上传送货单卡片 self.completeBtn_locator = ele_dic['completeBtn'] # 小键盘完成按钮 # Android独立的控件 if not self.is_run_ios(): name_list = ['confirm_time'] ele_dic = page_element_factory(self.xml_file, name_list) self.confirm_time_locator = ele_dic['confirm_time']
def _page_factory_android(self): name_list = [ 'add_unit', 'et_add', 'bt_add', 'search', 'unit_name', 'unit_edit', 'unit_del', 'input_edit', 'next', 'search_1', 'before_count', 'before_unit', 'later_count', 'later_name', 'manage_unit', 'confirm', 'convert', 'edit', 'delete', 'convert_later', 'convert_before', 'lanya', 'button1', 'card' ] ele_dic = page_element_factory(self.xml_file, name_list) self.add_unit_locator = ele_dic['add_unit'] # 添加单位 self.et_add_locator = ele_dic['et_add'] # 输入 self.bt_add_locator = ele_dic['bt_add'] # 确定 self.search_locator = ele_dic['search'] self.unit_name_locator = ele_dic['unit_name'] self.unit_edit_contract_locator = ele_dic['unit_edit'] # 编辑单位 self.unit_del_locator = ele_dic['unit_del'] # 删除单位 self.input_edit_locator = ele_dic['input_edit'] # 输入商品 self.next_locator = ele_dic['next'] self.search_1_locator = ele_dic['search_1'] self.before_count_locator = ele_dic['before_count'] # 数量 self.before_unit_locator = ele_dic['before_unit'] # 数量单位 self.later_count_locator = ele_dic['later_count'] self.later_name_locator = ele_dic['later_name'] self.manage_unit_locator = ele_dic['manage_unit'] # 管理单位 self.confirm_locator = ele_dic['confirm'] # 确定 self.convert_locator = ele_dic['convert'] # 转换 self.edit_locator = ele_dic['edit'] # 编辑转换 self.delete_locator = ele_dic['delete'] self.convert_later_locator = ele_dic['convert_later'] # 转换后 self.convert_before_locator = ele_dic['convert_before'] # 转换前 self.lanya_locator = ele_dic['lanya'] # 转换前 self.button1_locator = ele_dic['button1'] self.card_locator = ele_dic['card'] pass
def _page_factory_ios(self): name_list = [ 'add_unit', 'et_add', 'bt_add', 'search', 'unit_name', 'unit_edit', 'unit_del', 'input_edit', 'next', 'before_count', 'before_unit', 'later_count', 'later_name', 'manage_unit', 'confirm', 'convert', 'convert_unit', 'card', 'back' ] ele_dic = page_element_factory(self.xml_file, name_list) self.add_unit_locator = ele_dic['add_unit'] # 添加单位 self.et_add_locator = ele_dic['et_add'] # 输入 self.bt_add_locator = ele_dic['bt_add'] # 确定 self.search_locator = ele_dic['search'] self.unit_name_locator = ele_dic['unit_name'] self.unit_edit_contract_locator = ele_dic['unit_edit'] # 编辑单位 self.unit_del_locator = ele_dic['unit_del'] # 删除单位 self.input_edit_locator = ele_dic['input_edit'] # 输入商品 self.next_locator = ele_dic['next'] self.before_count_locator = ele_dic['before_count'] # 数量 self.before_unit_locator = ele_dic['before_unit'] # 数量单位 self.later_count_locator = ele_dic['later_count'] self.later_name_locator = ele_dic['later_name'] self.manage_unit_locator = ele_dic['manage_unit'] # 管理单位 self.confirm_locator = ele_dic['confirm'] # 确定 self.convert_locator = ele_dic['convert'] # 转换 self.convert_unit_locator = ele_dic['convert_unit'] # 转换 self.card_locator = ele_dic['card'] self.back_locator = ele_dic['back'] pass
def page_factory(self): name_list = ['search', 'assign', 'invite_and_assign'] ele_dic = page_element_factory(__file__, name_list) self.search_locator = ele_dic['search'] # 搜索 self.assign_locator = ele_dic['assign'] # 分配 self.invite_and_assign_locator = ele_dic['invite_and_assign'] # 邀请并分配 pass
def page_factory(self): # iOS and Android端统一的控件 name_list = ['chooseBtn', 'confirm', 'back'] ele_dic = page_element_factory(self.xml_file, name_list) self.chooseBtn_locator = ele_dic['chooseBtn'] # 选择滑动开关部 self.confirm_locator = ele_dic['confirm'] # 确认 self.back_locator = ele_dic['back'] # 返回
def page_factory(self): namelist = ["promptBox", "rejectButton"] ele_dic = page_element_factory(__file__, namelist) self.prompt_box_element = get_element(self.driver, ele_dic['promptBox']) # 选择类别框 self.reject_button_element = get_element( self.driver, ele_dic['rejectButton']) # 选择类别框
def page_factory(self): # iOS and Android端统一的控件 name_list = [ 'choose_friends', 'name', 'card_id', 'photo', 'nest_step', 'photo_okay', 'photo_done', 'photo_id_front', 'photo_id_back', 'id_photo_next', 'verify_num', 'verify_identify_code', 'verify_get_identify_code', 'verify_set_pwd', 'verify_confirm_pwd', 'verify_next_step', 'wechat_login', 'refresh', 'task_central' ] ele_dic = page_element_factory(self.xml_file, name_list) self.choose_friends_locator = ele_dic['choose_friends'] # self.name_locator = ele_dic['name'] # self.card_id_locator = ele_dic['card_id'] # self.photo_locator = ele_dic['photo'] # self.nest_step_locator = ele_dic['nest_step'] # self.photo_okay_locator = ele_dic['photo_okay'] # self.photo_done_locator = ele_dic['photo_done'] # self.photo_id_front_locator = ele_dic['photo_id_front'] # self.photo_id_back_locator = ele_dic['photo_id_back'] # self.id_photo_next_locator = ele_dic['id_photo_next'] # self.verify_num_locator = ele_dic['verify_num'] # self.verify_identify_code_locator = ele_dic['verify_identify_code'] # self.verify_get_identify_code_locator = ele_dic[ 'verify_get_identify_code'] # self.verify_set_pwd_locator = ele_dic['verify_set_pwd'] # self.verify_confirm_pwd_locator = ele_dic['verify_confirm_pwd'] # self.verify_next_step_locator = ele_dic['verify_next_step'] self.wechat_login_locator = ele_dic['wechat_login'] # 微信登录 self.refresh_locator = ele_dic['refresh'] # 刷新 self.task_central_locator = ele_dic['task_central'] # 任务中心
def page_factory(self): name_list = ['LoginInput', 'PwdInput', 'LoginBtn'] ele_dic = page_element_factory(__file__, name_list) self.username_locator = ele_dic['LoginInput'] self.password_locator = ele_dic['PwdInput'] self.login_submit_locator = ele_dic['LoginBtn'] pass
def page_factory(self): namelist = ["confirmButton", "fourButton"] ele_dic = page_element_factory(__file__, namelist) self.confirm_button_element = get_element( self.driver, ele_dic['confirmButton']) # 选择类别框 self.four_button_element = get_element(self.driver, ele_dic['fourButton']) # 第四个选择框
def page_factory(self): name_list = [ 'NextStepBtn1', 'NameTextInput', 'IDCardNumText', 'PhotographBtn', 'CameraBtn', 'HookBtn', 'ConfirmBtn', 'MobilePhoneInputText', 'VerifyBtn', 'VerifyCodeText', 'Submitted_SuccessfullyBtn', 'NestStepBtn2', 'DoneBtn', 'WSXXBtn', 'ChooseCountryCodeBtn', 'WebChatLoginBtn' ] element_metadata_dict = page_element_factory(__file__, name_list) self.NextStepBtn1_element = element_metadata_dict['NextStepBtn1'] self.NameTextInput_element = element_metadata_dict['NameTextInput'] self.IDCardNumText_element = element_metadata_dict['IDCardNumText'] self.PhotographBtn_element = element_metadata_dict['PhotographBtn'] self.CameraBtn_element = element_metadata_dict['CameraBtn'] self.HookBtn_element = element_metadata_dict['HookBtn'] self.ConfirmBtn_element = element_metadata_dict['ConfirmBtn'] self.MobilePhoneInputText_element = element_metadata_dict[ 'MobilePhoneInputText'] self.VerifyBtn_element = element_metadata_dict['VerifyBtn'] self.VerifyCodeText_element = element_metadata_dict['VerifyCodeText'] self.Submitted_SuccessfullyBtn_element = element_metadata_dict[ 'Submitted_SuccessfullyBtn'] self.NestStepBtn2_element = element_metadata_dict['NestStepBtn2'] self.DoneBtn_element = element_metadata_dict['DoneBtn'] self.WSXXBtn_element = element_metadata_dict['WSXXBtn'] self.ChooseCountryCodeBtn_element = element_metadata_dict[ 'ChooseCountryCodeBtn'] self.WebChatLoginBtn_element = element_metadata_dict['WebChatLoginBtn'] # self.TipAuditInformationText_element = element_metadata_dict['TipAuditInformationText'] # self.WSXXNext_element = element_metadata_dict['WSXXNext'] # self.SendVerificationBtn_element = element_metadata_dict['SendVerificationBtn'] # self.AlterOkBtn_element = element_metadata_dict['AlterOkBtn'] pass
def page_factory(self): name_list = [ 'la_card_picking', 'la_card_shelve', 'la_card_packing', 'la_card_transfer', 'position', 'enter_for', 'la_line', 'return_map', 'la_card', 'la_type', 'la_no', 'la_unit', 'la_start_time', 'la_end_time', 'enter_me', 'la_line_num', 'all_ele', 'think' ] ele_dic = page_element_factory(__file__, name_list) self.la_card_picking_locator = ele_dic['la_card_picking'] # 拣选 self.la_card_shelve_locator = ele_dic['la_card_shelve'] # 上架 self.la_card_packing_locator = ele_dic['la_card_packing'] # 包装 self.la_card_transfer_locator = ele_dic['la_card_transfer'] # 交接 self.position_locator = ele_dic['position'] # 位置 self.enter_for_locator = ele_dic['enter_for'] # 报名参加 self.la_line_locator = ele_dic['la_line'] # 线 self.return_map_locator = ele_dic['return_map'] # 返回 self.la_card_locator = ele_dic['la_card'] # 拣选员 self.la_type_locator = ele_dic['la_type'] # 第一个卡片的类型 self.la_no_locator = ele_dic['la_no'] # 第一个卡片的数量 self.la_unit_locator = ele_dic['la_unit'] # 第一个卡片的计量单位 self.la_start_time_locator = ele_dic['la_start_time'] # 第一个卡片的开始时间 self.la_end_time_locator = ele_dic['la_end_time'] # 第一个卡片的结束时间 self.enter_me_locator = ele_dic['enter_me'] # 我参见 self.la_line_num_locator = ele_dic['la_line_num'] # 线 self.all_ele = ele_dic['all_ele'] # 详情页面所有元素 self.think_locator = ele_dic['think'] # 再考虑 pass
def page_factory(self): name_list = [ 'supplier', 'contract_number', 'add_obligations', 'type', 'type_consignment', 'type_service_star', 'confirm', 'startdate', 'rl_enddate', 'lower_limit', 'most_limit', 'btn_tolerate', 'btn_cancel', 'add_next', 'btn_finish', 'la_line_num', 'all_ele' ] ele_dic = page_element_factory(__file__, name_list) self.supplier_locator = ele_dic['supplier'] # 供方id self.contract_number_locator = ele_dic['contract_number'] # 契约ukid self.add_obligations_locator = ele_dic['add_obligations'] # 添加义务项 self.type_locator = ele_dic['type'] # 类型 self.type_consignment_locator = ele_dic['type_consignment'] # 发货单量义务项 self.type_service_star_locator = ele_dic[ 'type_service_star'] # 服务星级义务项 self.confirm_locator = ele_dic['confirm'] # 确定 self.startdate_locator = ele_dic['startdate'] # 开始时间 self.rl_enddate_locator = ele_dic['rl_enddate'] # 结束时间 self.lower_limit_locator = ele_dic['lower_limit'] # 下限 self.most_limit_locator = ele_dic['most_limit'] # 上限 self.btn_tolerate_locator = ele_dic['btn_tolerate'] # 容忍 self.btn_cancel_locator = ele_dic['btn_cancel'] # 取消 self.add_next_locator = ele_dic['add_next'] # 继续添加 self.btn_finish_locator = ele_dic['btn_finish'] # 完成 self.btn_complete_locator = ele_dic['btn_complete'] # 时间确定 self.btn_next_locator = ele_dic['btn_next'] # 无需添加义务项 pass
def page_factory(self): name_list = ('clickActivationCommodity', 'inputFile', 'successActivation') ele_dic = page_element_factory(__file__, name_list) self.click_activation_locator = ele_dic['clickActivationCommodity'] self.import_commodity_file_locator = ele_dic['inputFile'] self.judge_avtivation_locator = ele_dic['successActivation'] pass
def page_factory(self): name_list = ('inputUserId', 'inputPassword', 'confirmButton') ele_dic = page_element_factory(__file__, name_list) self.input_name_locator = ele_dic['inputUserId'] self.input_password_locator = ele_dic['inputPassword'] self.confirm_button_locator = ele_dic['confirmButton'] pass
def _page_factory_android(self): name_list = [ 'management_button', 'add', 'fleeting', 'end', 'purview', 'append', 'life', 'third_set', 'finish', 'pay', 'build', 'sign', 'management', 'perfect', 'update', 'import', 'carriage', 'transport', 'change', 'settlement', 'owner', 'storage', 'supply', 'set' ] ele_dic = page_element_factory(self.xml_file, name_list) self.management_button_locator = ele_dic['management_button'] # 管理按钮 self.add_locator = ele_dic['add'] # 添加二级业务单位 self.fleeting_locator = ele_dic['fleeting'] # 二级业务单位名字“流年” self.end_locator = ele_dic['end'] # 输入名字完成 self.purview_locator = ele_dic['purview'] # 选择权限 self.append_locator = ele_dic['append'] # 添加三级业务单位 self.life_locator = ele_dic['life'] # 三级业务单位名字“生活” self.third_set_locator = ele_dic['third_set'] # 三级业务单位设置权限 self.finish_locator = ele_dic['finish'] # 完成业务单位管理 self.pay_locator = ele_dic['pay'] # 支付 self.build_locator = ele_dic['build'] # 创建业务单位 self.sign_locator = ele_dic['sign'] # 签订系统服务 self.management_locator = ele_dic['management'] # 管理业务单位 self.perfect_locator = ele_dic['perfect'] # 完善商品资料 self.update_locator = ele_dic['update'] # 支付完成更新原业务状态 self.import_locator = ele_dic['import'] # 导入库位库存 self.carriage_locator = ele_dic['carriage'] # 找运输供应 self.transport_locator = ele_dic['transport'] # 完善运输契约 self.change_locator = ele_dic['change'] # 管理者权限变更 self.settlement_locator = ele_dic['settlement'] # 运输费用结算记录 self.owner_locator = ele_dic['owner'] # 填写拥有的资产类型 self.storage_locator = ele_dic['storage'] # 为三级业务单位设置权限 self.supply_locator = ele_dic['supply'] # 为三级业务单位设置权限 self.set_locator = ele_dic['set'] # 权限设置完成
def page_factory(self): namelist = ('startLogin', 'userID', 'password', 'go') ele_dic = page_element_factory(__file__, namelist) self.start_login_locator = ele_dic['startLogin'] # 登录按钮 self.input_userID_locator = ele_dic['userID'] self.input_password_locaror = ele_dic['password'] self.click_go_locator = ele_dic['go']
def page_factory(self): name_list = ['CloseSyncBtn'] element_metadata_dict = page_element_factory(__file__, name_list) self.CloseSyncBtn_element = get_element( self.driver, element_metadata_dict['CloseSyncBtn']) pass
def page_factory(self): name_list = ['la_card_picking', 'la_card_shelve', 'la_card_packing', 'la_card_transfer', 'position', 'enter_for' , 'return_map', 'la_card', 'la_type', 'la_no', 'la_unit', 'la_start_time', 'la_end_time', 'enter_me', 'all_ele', 'think', 'yuan_hour', 'yuan_peace', 'work', 'address', 'start_time', 'end_time', 'msg_text'] ele_dic = page_element_factory(__file__, name_list) self.la_card_picking_locator = ele_dic['la_card_picking'] # 拣选 self.la_card_shelve_locator = ele_dic['la_card_shelve'] # 上架 self.la_card_packing_locator = ele_dic['la_card_packing'] # 包装 self.la_card_transfer_locator = ele_dic['la_card_transfer'] # 交接 self.position_locator = ele_dic['position'] # 位置 self.enter_for_locator = ele_dic['enter_for'] # 报名参加 self.return_map_locator = ele_dic['return_map'] # 返回 self.la_card_locator = ele_dic['la_card'] # 拣选员 self.la_type_locator = ele_dic['la_type'] # 第一个卡片的类型 self.la_no_locator = ele_dic['la_no'] # 第一个卡片的数量 self.la_unit_locator = ele_dic['la_unit'] # 第一个卡片的计量单位 self.la_start_time_locator = ele_dic['la_start_time'] # 第一个卡片的开始时间 self.la_end_time_locator = ele_dic['la_end_time'] # 第一个卡片的结束时间 self.enter_me_locator = ele_dic['enter_me'] # 我参加 self.all_ele = ele_dic['all_ele'] # 详情页面所有元素 self.end_time_locator = ele_dic['end_time'] # 结束时间 self.yuan_hour_locator = ele_dic['yuan_hour'] self.yuan_peace_locator = ele_dic['yuan_peace'] self.work_locator = ele_dic['work'] # 工作时间 self.address_locator = ele_dic['address'] # 详细地址 self.start_time_locator = ele_dic['start_time'] # 开始时间 self.think_locator = ele_dic['think'] # 再考虑 self.msg_text_locator = ele_dic['msg_text'] # 再考虑
def page_factory(self): name_list = [ "input_warehouse_name", "button_warehouse_address", "button_warehouse_map_first", "input_warehouse_detail_address", "input_warehouse_area", "input_warehouse_rent", "input_warehouse_contact", "input_warehouse_phone", "button_activate", "button_ok" ] ele_dic = page_element_factory(self.standard_xml_file, name_list) # 仓库名称 self.input_warehouse_name = ele_dic["input_warehouse_name"] # 所在地址:请选择地区 self.button_warehouse_address = ele_dic["button_warehouse_address"] # 请选择地区打开的页面:第一个地址定位控件 self.button_warehouse_map_first = ele_dic["button_warehouse_map_first"] # 详细地址 self.input_warehouse_detail_address = ele_dic[ "input_warehouse_detail_address"] # 仓库面积 self.input_warehouse_area = ele_dic["input_warehouse_area"] # 仓库租金 self.input_warehouse_rent = ele_dic["input_warehouse_rent"] # 仓库联系人 self.input_warehouse_contact = ele_dic["input_warehouse_contact"] # 仓库联系人手机号码 self.input_warehouse_phone = ele_dic["input_warehouse_phone"] # 激活按钮 self.button_activate = ele_dic["button_activate"] # 激活成功页面:好的按钮 self.button_ok = ele_dic["button_ok"]
def page_factory(self): name_list = [ 'Please_select', 'Picking', 'Packaging', 'Handover', 'Shelves', 'icon_cut', 'icon_add', 'DayShift', 'Night', 'SelectDate', 'SelectAddress', 'Location', 'Complete', 'ContinueRelease', 'Province', 'Provinces_city', 'Provinces_cities_area' ] ele_dic = page_element_factory(__file__, name_list) self.picking_locator = ele_dic['Picking'] # 拣选 self.packaging_locator = ele_dic['Packaging'] # 包装 self.handover_locator = ele_dic['Handover'] # 交接 self.shelves_locator = ele_dic['Shelves'] # 上架 self.icon_cut_locator = ele_dic['icon_cut'] # 人数 - self.icon_add_locator = ele_dic['icon_add'] # 人数 + self.day_shift_locator = ele_dic['DayShift'] # 白班 self.night_locator = ele_dic['Night'] # 晚班 self.select_date_locator = ele_dic['SelectDate'] # 选择时间 self.select_address_locator = ele_dic['SelectAddress'] # 选择地址 self.location_locator = ele_dic['Location'] self.complete_locator = ele_dic['Complete'] # 完成 self.continue_release_locator = ele_dic['ContinueRelease'] # 继续发布 self.please_select_locator = ele_dic['Please_select'] # 请选择 self.province_locator = ele_dic['Province'] # 省 self.provinces_city_locator = ele_dic['Provinces_city'] # 市 self.provinces_cities_area_locator = ele_dic[ 'Provinces_cities_area'] # 区 self.confirm_locator = ele_dic['confirm'] # 确定 pass
def page_factory(self): name_list = [ 'Carton', 'CommodityCode', 'ProductBatch', 'Amount', 'Units', 'Box', 'Piece', 'Mention', 'Bag', 'Determine', 'DefectiveGoods', 'Non-DefectiveProduct', 'TakingPictures', 'CompleteInspection', 'CheckNext', 'Photograph', 'Use_photo' ] ele_dic = page_element_factory(self.xml_file, name_list) self.carton_locator = ele_dic['Carton'] self.commoditycode_locator = ele_dic['CommodityCode'] self.productbatch_locator = ele_dic['ProductBatch'] self.amount_locator = ele_dic['Amount'] self.units_locator = ele_dic['Units'] self.box_locator = ele_dic['Box'] self.piece_locator = ele_dic['Piece'] self.mention_locator = ele_dic['Mention'] self.bag_locator = ele_dic['Bag'] self.determine_locator = ele_dic['Determine'] self.defectivegoods_locator = ele_dic['DefectiveGoods'] self.non_defectiveProduct_locator = ele_dic['Non-DefectiveProduct'] self.takingpictures_locator = ele_dic['TakingPictures'] self.completeinspection_locator = ele_dic['CompleteInspection'] self.checknext_locator = ele_dic['CheckNext'] self.photograph_locator = ele_dic['Photograph'] self.use_photo_locator = ele_dic['Use_photo']
def page_factory(self): name_list = ['userName', 'password', 'login-submit'] ele_dic = page_element_factory(__file__, name_list) self.username_locator = ele_dic['userName'] self.password_locator = ele_dic['password'] self.login_submit_locator = ele_dic['login-submit'] pass
def page_factory(self): """ 初始化页面控件 """ # 2端统一的控件 name_list = [ 'add_obligations', 'without_add_obligations', 'service_type', 'invoice_amount', 'confirm', 'start_time', 'end_time', 'quantity_ceiling', 'type', 'lower_number', 'origin', 'tolerate', 'resource_discount', 'complete', 'continue_add', 'all_compulsory_items', 'swipe_year', 'select_time_confirm', 'close' ] ele_dic = page_element_factory(self.xml_file, name_list) self.add_obligations_locator = ele_dic['add_obligations'] self.without_add_obligations_locator = ele_dic[ 'without_add_obligations'] self.invoice_amount_locator = ele_dic['invoice_amount'] self.service_type_locator = ele_dic['service_type'] self.start_time_locator = ele_dic['start_time'] self.end_time_locator = ele_dic['end_time'] self.type_locator = ele_dic['type'] self.confirm_locator = ele_dic['confirm'] self.quantity_ceiling_locator = ele_dic['quantity_ceiling'] # 上限 self.lower_number_locator = ele_dic['lower_number'] # 下限 self.origin_locator = ele_dic['origin'] self.tolerate_locator = ele_dic['tolerate'] # 容忍 self.resource_discount_locator = ele_dic['resource_discount'] # 折扣 self.complete_locator = ele_dic['complete'] self.continue_add_locator = ele_dic['continue_add'] self.all_compulsory_items_locator = ele_dic['all_compulsory_items'] self.swipe_year_locator = ele_dic['swipe_year'] self.select_time_confirm_locator = ele_dic['select_time_confirm'] self.close_locator = ele_dic['close']
def page_factory(self): name_list = [ 'TeamThreeBtn', 'LoginInput', 'LoginBtn', 'SelectFriendBtn' ] element_metadata_dict = page_element_factory(__file__, name_list) self.TeamThreeBtn_element = element_metadata_dict['TeamThreeBtn'] self.LoginInput_element = element_metadata_dict['LoginInput'] self.LoginBtn_element = element_metadata_dict['LoginBtn'] self.SelectFriendBtn_element = element_metadata_dict['SelectFriendBtn'] # self.CameraBtn_element = element_metadata_dict['CameraBtn'] # self.ConfirmBtn_element = element_metadata_dict['ConfirmBtn'] # self.MobilePhoneInputText_element = element_metadata_dict['MobilePhoneInputText'] # self.VerifyBtn_element = element_metadata_dict['VerifyBtn'] # self.VerifyCodeText_element = element_metadata_dict['VerifyCodeText'] # self.Submitted_SuccessfullyBtn_element = element_metadata_dict['Submitted_SuccessfullyBtn'] # self.NestStepBtn2_element = element_metadata_dict['NestStepBtn2'] # self.DoneBtn_element = element_metadata_dict['DoneBtn'] # self.WSXXBtn_element = element_metadata_dict['WSXXBtn'] # self.ChooseCountryCodeBtn_element = element_metadata_dict['ChooseCountryCodeBtn'] # self.ChooseCNCodeBtn_element = element_metadata_dict['ChooseCNCodeBtn'] # self.ChooseUSACodeBtn_element = element_metadata_dict['ChooseUSACodeBtn'] # self.LoginBtn_element = element_metadata_dict['LoginBtn'] # self.SendVerificationBtn_element = element_metadata_dict['SendVerificationBtn'] # self.AlterOkBtn_element = element_metadata_dict['AlterOkBtn'] pass
def page_factory(self): name_list = ('navMore', 'navMe', 'logout') ele_dic = page_element_factory(self.xml_file, name_list) self.click_nav_more_locator = ele_dic['navMore'] self.click_nav_me_locator = ele_dic['navMe'] self.click_logout_locator = ele_dic['logout'] pass
def page_factory(self): name_list = [ 'select_logistics_brand', 'modify_receipt_information', 'OpenOrderDownload', 'OpenSyncCardBtn', 'close_order_download', 'long_task', 'generate_labor_demand', 'generate_bill' ] ele_dic = page_element_factory(__file__, name_list) self.select_logistics_brand_locator = ele_dic[ 'select_logistics_brand'] # 选择物流品牌 self.modify_receipt_information_locator = ele_dic[ 'modify_receipt_information'] # 修改收货信息 self.open_order_download_locator = ele_dic[ 'OpenOrderDownload'] # 开启订单下载 self.OpenSyncCardBtn_element = ele_dic['OpenSyncCardBtn'] self.close_order_download_locator = ele_dic[ 'close_order_download'] # 关闭订单下载 self.long_task_locator = ele_dic['long_task'] # XX个长期任务 self.generate_labor_demand_locator = ele_dic[ 'generate_labor_demand'] # 生成找劳务需求的任务 self.generate_bill_locator = ele_dic['generate_bill'] # 生成账单 self.CardOne_locator = ele_dic['CardOne'] # 非服务认证卡片 self.sign_labor_contract_locator = ele_dic[ 'sign_labor_contract'] # 生成找劳务需求的任务 self.sign_warehouse_supply_contract_locator = ele_dic[ 'sign_warehouse_supply_contract'] # 生成找仓储供应的任务 self.sign_warehouse_demand_contract_locator = ele_dic[ 'sign_warehouse_demand_contract'] # 生成找仓储需求的任务 self.CardTwo_locator = ele_dic['CardTwo'] self.f5_locator = ele_dic['f5'] # 刷新 self.non_service_certification_locator = ele_dic[ 'non_service_certification'] # 非服务认证 pass