def setUpClass(self): #最开始执行 #建立连接信息 cnn = Connect() self.driver = cnn.connect() #创建工具类 self.tools = Tools(self.driver) #tools工具 #创建_BrowseOrgSpace公有定位控件对象 self.spaceB = _BrowseOrgSpaceHandle(self.driver) self.spaceC = _CreateOrgSpaceHandle(self.driver) #创建读取配置信息对象 cf = GlobalParam('config', 'path_file.conf') #获取截图路径、日志路径、日志名 self.screen_path = cf.getParam('space', "path_001") #通过配置文件获取截图的路径 self.log_path = cf.getParam('space', "log") #通过配置文件获取日志的路径 self.logfile = cf.getParam('space', "logfile") #日志文件名 #创建Createspace和Closespace对象 self.cr = CreateSpace() self.cl = CloseSpace() sleep(2) #测试数据 d = DataInfo() #创建DataInfo()对象 self.fullname = d.cell("test1", 2, 1) #fullname self.easyname = d.cell( "test1", 2, 2, ) #easyname
def closeSpace(self, driver): """ 菜单栏用坐标定位:34行,实属无奈之举 """ #创建工具类 tools = Tools(driver) #tools工具 #创建_SPACEHANDLE5公有定位控件对象 handle = _SPACEHANDLE5(driver) #测试数据 d = DataInfo() #创建DataInfo()对象 # self.easyname = d.cell("test001",2,2,) self.menu_x = int(d.cell("test001", 2, 11)) #fullname self.menu_y = int(d.cell( "test001", 2, 12, )) #easyname sleep(1) try: #为了保证不中途退出,需要第一次进入的时候检查是否存在该机构,如果存在,先关闭 handle.Kjlb_browseorgspaceByID_click(0) #点击进入 sleep(1) handle.Kjlb_browseorgspace_menu_click() #菜单栏 handle.Kjlb_browseorgspace_menu_bcard_click() #企业名片 handle.Kjlb_browseorgspace_menu_bcard_menu_click() #菜单栏 handle.Kjlb_browseorgspace_menu_bcard_menu_close_click() #关闭 handle.Kjlb_browseorgspace_menu_bcard_menu_close_confirm_click( ) #确认关闭 except Exception as err: logging.error("Error Information CloseSpace Inside : %s" % err) raise err
def __init__(self):#初始化测试数据 d = DataInfo()#创建DataInfo()对象 self.spacename = d.cell("test003",2,1)#测试空间123 self.AdministratorLoc = int(d.cell("test003",2,2))#管理员编辑 self.SalespersonLoc = int(d.cell("test003",2,2))#销售员编辑 self.AssistantLoc = int( d.cell("test003",2,4))#行政助理编辑 self.AdmNum = int(d.cell("test003",2,5))#管理员人数 self.SalNum = int(d.cell("test003",2,6))#销售员人数 self.AssNum = int(d.cell("test003",2,7))#行政助理人数 self.Name = d.cell("test003",2,8)#肖静远 self.Director = int(d.cell("test003",2,9))#董事会 self.Marketing = int(d.cell("test003",2,10))#营销部 self.HR = int(d.cell("test003",2,11))#人事部
def __init__(self): #初始化测试数据 d = DataInfo() #创建DataInfo()对象 self.contact = d.cell("test005", 2, 1) #联系人 self.phone = int(d.cell("test005", 2, 2)) #手机号 self.tel = int(d.cell("test005", 2, 3)) #座机号 self.email = d.cell("test005", 2, 4) #邮箱 self.QQ = int(d.cell("test005", 2, 5)) #QQ self.website = d.cell("test005", 2, 6) #网址
def deletePerSFloder(self, driver, spacename): #创建 _SPACEHANDLE5公有定位控件对象 handle = _SPACEHANDLE5(driver) #测试数据 d = DataInfo() self.spacename = d.cell( "test006", 2, 13, ) #私人空间名 sleep(2) try: #1.点击该空间 handle.Kjlb_browseorgspaceByName_click(spacename) if driver.find_element_by_id( "com.yunlu6.stone:id/personzone_item_foldernum" ).text != "(0)": #判断文件夹是否为空 #2.菜单栏 handle.Kjlb_browseperspace_menu_click() #3.编辑 handle.Kjlb_browseperspace_menu_edit_click() #4.删除文件夹 #4.1删除文件夹(此时不为空) handle.Kjlb_browseperspace_more_menu_edit_deletefolder_click(0) #4.2照片列表 handle.Kjlb_browseperspace_more_menu_edit_deletefolder_piclist_click( 0) #4.3删除 handle.Kjlb_browseperspace_more_menu_edit_deletefolder_dbtn_click( ) #4.4是 handle.Kjlb_browseperspace_more_menu_edit_deletefolder_dbtn_y_click( ) #4.5删除文件夹(为空) handle.Kjlb_browseperspace_more_menu_edit_deletefolder_click(0) driver.find_element_by_id( "com.yunlu6.stone:id/edit_folder_ok").click() else: #4.5.菜单栏 handle.Kjlb_browseperspace_menu_click() #4.6.编辑 handle.Kjlb_browseperspace_menu_edit_click() #4.7删除文件夹(为空) handle.Kjlb_browseperspace_more_menu_edit_deletefolder_click(0) driver.find_element_by_id( "com.yunlu6.stone:id/edit_folder_ok").click() #5.返回空间列表 handle.Kjlb_browseperspace_more_menu_edit_back_click() except Exception as err: logging.error("Error Information CloseSpace Inside : %s" % err) raise err
def closeSpace(self, driver): """ 菜单栏用坐标定位:34行,实属无奈之举 """ #创建工具类 tools = Tools(driver) #tools工具 #创建_OrgSpaceBCard公有定位控件对象 spaceB = _OrgSpaceBCardHandle(driver) #创建读取配置信息对象 cf = GlobalParam('config', 'path_file.conf') #获取截图路径、日志路径、日志名 screen_path = cf.getParam('space', "path_001") #通过配置文件获取截图的路径 #测试数据 d = DataInfo() #创建DataInfo()对象 # self.easyname = d.cell("test1",2,2,) self.menu_x = int(d.cell("test1", 2, 11)) #fullname self.menu_y = int(d.cell( "test1", 2, 12, )) #easyname sleep(2) try: #为了保证不中途退出,需要第一次进入的时候检查是否存在该机构,如果存在,先关闭 spaceB.Kjlb_browseorgspaceByID_click(0) #点击进入 sleep(2) # driver.tap([(self.menu_x,self.menu_y)], 500)#菜单栏 spaceB.Kjlb_browseorgspace_menu_click() #菜单栏 spaceB.Kjlb_browseorgspace_menu_bcard_click() #企业名片 spaceB.Kjlb_browseorgspace_menu_bcard_menu_click() #菜单栏 spaceB.Kjlb_browseorgspace_menu_bcard_menu_close_click() #关闭 tools.getScreenShot(screen_path, "关闭空间确认") spaceB.Kjlb_browseorgspace_menu_bcard_menu_close_confirm_click( ) #确认关闭 tools.getScreenShot(screen_path, "存在该机构将其关闭了") finally: tools.getScreenShot(screen_path, 'finallyclosespace') #截图 logging.info("FinishCloseSpace@@!!!!!!!") #打印错误的日志
def __init__(self): #初始化测试数据 d = DataInfo() #创建DataInfo()对象 self.province = (d.cell("test001", 2, 4)) #北京 self.city = (d.cell("test001", 2, 5)) #东城 self.soverbank = d.cell("test001", 2, 7) #开户行 self.sovermybank = d.cell("test001", 2, 8) #支行 self.soverbanknub = int(d.cell("test001", 2, 9)) #银行账号 self.customertype = int(d.cell("test001", 2, 3)) #客户类型 self.industry = int(d.cell("test001", 2, 10)) #产业角色
def setUpClass(self): #最开始执行 #1.建立连接信息 cnn = Connect() self.driver = cnn.connect() #2.创建工具类 self.tools = Tools(self.driver) #tools工具 #3.创建_SPACEHANDLE5公有定位控件对象 self.handle = _SPACEHANDLE5(self.driver) #4.创建读取配置信息对象 cf = GlobalParam('config', 'path_file.conf') #5.获取截图路径、日志路径、日志名 self.screen_path = cf.getParam('space', "path_006") #通过配置文件获取截图的路径 self.log_path = cf.getParam('space', "log") #通过配置文件获取日志的路径 self.logfile = cf.getParam('space', "logfile") #日志文件名 #6.创建Createspace、Closespace、CreatePerSFolder对象 self.cr = CreatePersonSpace() self.cl = ClosePersonSpace() self.cpf = CreatePerSFolder() self.cpl = DeletePerSFloder() sleep(2) #7.准备测试数据 d = DataInfo() #创建DataInfo()对象 self.spacename = d.cell("test006", 2, 13) #空间名:appium私人空间 self.foldername1 = d.cell("test006", 2, 14) #文件夹1:appium文件夹
def setUpClass(self):#最开始执行 #建立连接信息 cnn = Connect() self.driver = cnn.connect() #创建工具类 self.tools = Tools(self.driver)#tools工具 #创建_BrowseOrgSpace公有定位控件对象 self.spaceB = _BrowseOrgSpaceHandle(self.driver) #创建_OrgSpaceProduct公有定位控件对象 self.spaceP = _OrgSpaceProductHandle(self.driver) #创建读取配置信息对象 cf = GlobalParam('config','path_file.conf') #获取截图路径、日志路径、日志名 self.screen_path = cf.getParam('space',"path_002")#通过配置文件获取截图的路径 self.log_path = cf.getParam('space',"log")#通过配置文件获取日志的路径 self.logfile = cf.getParam('space',"logfile")#日志文件名 sleep(2) #创建CreateProduct和DeleteProduct对象 self.cr = CreateProduct() self.dl = DeleteProduct() #测试数据 d = DataInfo()#创建DataInfo()对象 self.spacename = d.cell("test2",2,1)#空间名 self.proname = d.cell("test2",2,3)
def setUpClass(self): #最开始执行 #建立连接信息 cnn = Connect() self.driver = cnn.connect() #创建工具类 self.tools = Tools(self.driver) #tools工具 #创建_SPACEHANDLE5公有定位控件对象 self.handle = _SPACEHANDLE5(self.driver) #创建读取配置信息对象 cf = GlobalParam('config', 'path_file.conf') #获取截图路径、日志路径、日志名 self.screen_path = cf.getParam('space', "path_005") #通过配置文件获取截图的路径 self.log_path = cf.getParam('space', "log") #通过配置文件获取日志的路径 self.logfile = cf.getParam('space', "logfile") #日志文件名 #创建BusinessCard对象 self.spaceBu = BusinessCard() sleep(2) #测试数据 d = DataInfo() #创建DataInfo()对象 self.spacename = d.cell("test005", 2, 7) #测试空间123
def __init__(self): d = DataInfo("login.xlsx")#创建DataInfo()对象 self.telp = str(int(d.cell("test1",2,1)))#获取手机号136667618021 self.pwd = d.cell("test1",2,2)#获取密码free930923
def __init__(self): #初始化测试数据 #测试数据 d = DataInfo() #创建DataInfo()对象 self.spacename = d.cell("test2", 2, 1) #空间名 self.photo = int(d.cell("test2", 2, 2)) #photo列表 self.proname = d.cell("test2", 2, 3) #商品名 self.tag1 = int(d.cell("test2", 2, 4)) #tag1 self.tag2 = int(d.cell("test2", 2, 5)) #tag2 self.species = d.cell("test2", 2, 6) #种类名 self.type = int(d.cell("test2", 2, 7)) #制品 self.surface = int(d.cell("test2", 2, 8)) #表面 self.key = d.cell("test2", 2, 9) #参数名 self.value = d.cell("test2", 2, 10) #参数值 self.price1 = int(d.cell("test2", 2, 11)) #price1 self.stock1 = int(d.cell("test2", 2, 12)) #stock1 self.price2 = int(d.cell("test2", 2, 13)) #price2 self.stock2 = d.cell("test2", 2, 14) #stock2 self.price3 = d.cell("test2", 2, 15) #price3 self.stock3 = int(d.cell("test2", 2, 16)) #stock3 self.price4 = int(d.cell("test2", 2, 17)) #price4 self.stock4 = int(d.cell("test2", 2, 18)) #stock4 self.menu_x = int(d.cell("test2", 2, 19)) #menu_x self.menu_y = int(d.cell("test2", 2, 20)) #menu_y
def __init__(self): #初始化测试数据 d = DataInfo() #创建DataInfo()对象 self.foldername1 = d.cell("test006", 2, 14) #文件夹1:appium文件夹
def __init__(self): #初始化测试数据 d = DataInfo() #创建DataInfo()对象 self.title = d.cell("test004", 2, 1) #测试空间123 self.typelist = int(d.cell("test004", 2, 2)) #类型列表:经典作品
def __init__(self): #初始化测试数据 d = DataInfo() #创建DataInfo()对象 #1.空间类型 self.clothes = int(d.cell("test006", 2, 1)) #衣0 self.food = int(d.cell("test006", 2, 2)) #食1 self.live = int(d.cell("test006", 2, 3)) #住2 self.walk = int(d.cell("test006", 2, 4)) #行3 self.study = int(d.cell("test006", 2, 5)) #学习4 self.health = int(d.cell("test006", 2, 6)) #健康5 self.social = int(d.cell("test006", 2, 7)) #社交6 self.work = int(d.cell("test006", 2, 8)) #工作7 self.literature = int(d.cell("test006", 2, 9)) #文艺8 self.entertainment = int(d.cell("test006", 2, 10)) #娱乐9 self.beauty = int(d.cell("test006", 2, 11)) #美护10 self.other = int(d.cell("test006", 2, 12)) #其它11 #2.各空间类型下热门空间名第1个标签 self.clothesT = (d.cell("test006", 3, 1)) #我的衣柜0 self.foodT = (d.cell("test006", 3, 2)) #舌尖上的中国1 self.liveT = (d.cell("test006", 3, 3)) #我爱我家2 self.walkT = (d.cell("test006", 3, 4)) #旅游照片3 self.studyT = (d.cell("test006", 3, 5)) #互联网十4 self.healthT = (d.cell("test006", 3, 6)) #强身健体5 self.socialT = (d.cell("test006", 3, 7)) #同学们6 self.workT = (d.cell("test006", 3, 8)) #办公场所7 self.literatureT = (d.cell("test006", 3, 9)) #文娱空间8 self.entertainmentT = (d.cell("test006", 3, 10)) #电影放映室9 self.beautyT = (d.cell("test006", 3, 11)) #Onlyyou10 self.otherT = (d.cell("test006", 3, 12)) #摄影11