# coding: utf-8 #from wangye import wangyeInfomation from appsaler import appsalerInformation from pymssqlManage import excelManager # saler,dealer,sr,express,htv,pc = excelManager.banbeninfo("retail",r"E:\banben\banben.xlsx") saler,dealer,sr,express,htv,pc = excelManager.banbeninfo("uat",r"D:\excel\banben.xls") #首页 if __name__ == '__main__': bb = appsalerInformation("172.18.200.192:7912") bb.start_app() bb.salerlogintrue(int(saler[4]),int(saler[5])) bb.appsalerHomepage_lunbotu() bb.salerLog_banben(dealer[6],dealer[9])
# coding: utf-8 import time from wangye import wangyeInfomation_Tvnew from appsaler import appsalerInformation from pymssqlManage import excelManager saler, dealer, sr, express, htv, pc = excelManager.banbeninfo( "retail", r"E:\banben\banben.xlsx") #新的惠tv if __name__ == '__main__': #1660313 bb = appsalerInformation("192.168.253.3:7912") aa = wangyeInfomation_Tvnew() aa.wangyeLogin_newTv(htv[1], htv[2], htv[3]) #登录后台 spname = aa.wangyeNewtv_RecommendingCommodities(htv[4], htv[5], htv[6], htv[7], htv[8]) bb.salerNewTv_RecommendingCommodities(htv[4]) #惠tv推荐购物车 aa.wangyeNewtv_RecommendingCommodities_del() bb.salerLog_banben(dealer[6], dealer[25]) # easyui_textbox_input1,easyui_textbox_input10 = aa.wangyetvNew_add(u"自动化新惠tv3",u"自动化测试王斌",r"newTv.mp4",r"newTv.png",u"汉西") # # time.sleep(6) # # aa.wangyetvNew_iframe("mainFrame") # aa.wangyetvNew_topstick(u"自动化新惠tv3")#easyui_textbox_input1 # aa.wangeytvNew_UploadAwards(u"汉西","10","100","1000")#上传视频奖励 # aa.wangeytvNew_shouloadAwards(u"汉西","10"," 50")#视频观看奖励 # newtvname = bb.salerNewTvshou(u"自动化观看视频发送评论")#视频观看操作 # aa.wangyeNewtv_Barragereview(u"后台上传", "0") # 审核评论 # print newtvname bb.backCommonMethod()
def aa(ip): #注册 #register = appsalerInformation(ip) #register.register("14161915043","注册五分钟,编程两小时","自动化注册","北京东升软件园","14561915041","00000000-3460-c818-0000-000035cca63e","DuvIFg5Zpp3DWK5hLisE7EbbA055RROMbAFEmtrB+uYvTBteCcv4hAuw1r/ZfrhrgjXYpA+7/MWqBnj1aZL2j13Q","efbeb424-037e-4fb9-884b-b5103b3eb641","http://retail.winhxd.com:8203/", "fanhanqingsaler", "28158116") #register.salerloginOff() # 登录 bb = appsalerInformation(ip) phonebrand = bb.start_app() bb.salerLog_banben(dealer[30], dealer[31]) bb.salerlogintrue(xlsx_salername, xlsx_salerpwd) bb.salerLog_banben(dealer[30], dealer[32]) # bb.appscreenshot() # 首页管理 time.sleep(5) bb.appsalerHomepage_lunbotu() bb.salerLog_banben(dealer[30], dealer[33]) # 经销商仓库 # #bb.appsalerjxs() bb.salerEnterstorehouse() isTure = bb.salerjxsStorehouse(saler[72], "HUAWEI") bb.salerLog_banben(dealer[30], dealer[34]) time.sleep(3) bb.salerBack() bb.salerBack() #促销信息 aa = wangyeInfomation() #网页登录 aa.wangyeLogin(xlsxHt_hxdUrl, xlsxHt_hxdname, xlsxHt_hxdpwd) #linkDesc 设置代理品牌促销信息 #linkDesc = aa.wangyePromotion_banner(saler[7],saler[8], saler[9]) linkDesc = aa.wangyePromotion_banner(saler[73], saler[72], saler[74]) aa.wangeyqiehuaniframe("menu1") #promotionSimpleDesc = aa.wangyePromotion_jxs(saler[10], saler[11]) promotionSimpleDesc = aa.wangyePromotion_jxs(saler[73], saler[75]) aa.wangeyqiehuaniframe("menu1") #prodPromotion = aa.wangyePromotion_shop(saler[12], saler[13],saler[14], saler[15]) prodPromotion = aa.wangyePromotion_shop(saler[73], saler[72], saler[76], int(saler[77])) bb.salerEnterstorehouse() shopPromotion1, shopPromotion2, banerProtion1, jxsProtion = bb.salerPromotion( ) assert_that(shopPromotion1 == prodPromotion and shopPromotion2 == prodPromotion and banerProtion1 == linkDesc and jxsProtion == promotionSimpleDesc) bb.salerLog_banben(dealer[30], dealer[35]) bb.salerBack() time.sleep(3) bb.salerBack() time.sleep(3) bb.salerBack() time.sleep(3) bb.salerBack() time.sleep(3) bb.salerMyinformation(saler[16], saler[17], saler[18]) #王斌自动化 bb.salerLog_banben(dealer[30], dealer[36]) #bb.salerAddrmanage(saler[19],saler[20],saler[21],saler[22]) #bb.salerAddrdelete() # bb.salerLog_banben(dealer[6],dealer[13]) # bb.salerBack() # bb.salerBack() # bb.start_app() #升级 bb.salerUpgrade(str(xlsx_salername), "huawei") cc = appdealerInformation(ip) cc.dealerstart_app() cc.dealerlogin(xlsx_dealername, xlsx_dealerpwd) cc.dealerUpgrade(str(xlsx_dealername)) bb.salerLog_banben(dealer[30], dealer[38]) cc.dealerBack() bb.start_app() bb.salerBack() # 修改密码 pwd1 = bb.salermodifypwd(xlsx_salerpwd, str(xlsx_salerpwd) + "new") print(pwd1[0], pwd1[1]) bb.salerlogintrue(xlsx_salername, pwd1[1]) cc.dealerstart_app() pwd2 = cc.dealerModifypwd(xlsx_dealerpwd, str(xlsx_dealerpwd) + "new", str(xlsx_dealerpwd) + "new") print(pwd2[0], pwd2[1]) cc.dealerlogin(xlsx_dealername, pwd2[1]) bb.salerLog_banben(dealer[30], dealer[39]) bb.start_app() # 惠聊 bb.salerHuionline(phonebrand) bb.salerAddshopping("5") # # cc.dealerlogin(u"14778786566",u"aa248163")#jxs登录 cc.dealerstart_app() cc.dealerHuionline() cc.dealerHuionline_youhuiquan() bb.salerHuionline_youhuiquan() bb.salerLog_banben(dealer[30], dealer[40]) time.sleep(4) bb.salerBack() time.sleep(3) bb.salerBack() # 预订单 bb.salerEnterstorehouse() bb.salerAddshopping_1() bb.salerEntershopping_Cart() # 购物车总价 tv_state = bb.salerEnterAdveeorder() print(tv_state) # 邀请码和备注#预订单的总价和应付额 sum_money_textview, actual_payment_textview = bb.salerAdverorder( int(saler[78]), saler[79]) print(sum_money_textview) print(actual_payment_textview) tv_order_money = bb.salerEnterOrder() print(tv_order_money) cc.dealerstart_app() cc.dealerBack() time.sleep(4) cc.dealerBack() bb.salerLog_banben(dealer[30], dealer[41]) # 选择送货员,确认订单,选择现金支付 #bb = appsalerInformation(ip) #cc = appdealerInformation(ip) cc.dealerOrder_confirm() bb.start_app() bb.finishorder() bb.salerLog_banben(dealer[30], dealer[42]) #cc.dealerBack() #time.sleep(3) #cc.dealerBack() # 退出登录 bb.salerloginOff() cc.dealerstart_app() cc.dealerOfflogin() aa.wangyeQuit() bb.salerLog_banben(dealer[30], dealer[43])
def aa(ip): # 登录 bb = appsalerInformation(ip) phonebrand = bb.start_app() bb.salerLog_banben(dealer[30], dealer[31]) bb.salerlogintrue(xlsx_salername, xlsx_salerpwd) bb.salerLog_banben(dealer[30], dealer[32]) # bb.appscreenshot() # 首页管理 time.sleep(5) bb.appsalerHomepage_lunbotu() bb.salerLog_banben(dealer[30], dealer[33]) # 经销商仓库 # #bb.appsalerjxs() bb.salerEnterstorehouse() isTure = bb.salerjxsStorehouse(saler[45], "HUAWEI") bb.salerLog_banben(dealer[30], dealer[34]) time.sleep(3) bb.salerBack() bb.salerBack() #促销信息 aa = wangyeInfomation() #网页登录 aa.wangyeLogin(xlsxHt_hxdUrl, xlsxHt_hxdname, xlsxHt_hxdpwd) #linkDesc 设置代理品牌促销信息 #linkDesc = aa.wangyePromotion_banner(saler[7],saler[8], saler[9]) linkDesc = aa.wangyePromotion_banner(saler[46], saler[45], saler[47]) aa.wangeyqiehuaniframe("menu1") #promotionSimpleDesc = aa.wangyePromotion_jxs(saler[10], saler[11]) promotionSimpleDesc = aa.wangyePromotion_jxs(saler[46], saler[48]) aa.wangeyqiehuaniframe("menu1") #prodPromotion = aa.wangyePromotion_shop(saler[12], saler[13],saler[14], saler[15]) prodPromotion = aa.wangyePromotion_shop(saler[46], saler[45], saler[49], int(saler[50])) bb.salerEnterstorehouse() shopPromotion1, shopPromotion2, banerProtion1, jxsProtion = bb.salerPromotion( ) assert_that(shopPromotion1 == prodPromotion and shopPromotion2 == prodPromotion and banerProtion1 == linkDesc and jxsProtion == promotionSimpleDesc) bb.salerLog_banben(dealer[30], dealer[35]) bb.salerBack() time.sleep(3) bb.salerBack() time.sleep(3) bb.salerBack() time.sleep(3) bb.salerBack() time.sleep(3) bb.salerMyinformation(saler[16], saler[17], saler[18]) #王斌自动化 bb.salerLog_banben(dealer[30], dealer[36]) #bb.salerAddrmanage(saler[19],saler[20],saler[21],saler[22]) #bb.salerAddrdelete() # bb.salerLog_banben(dealer[6],dealer[13]) # bb.salerBack() # bb.salerBack() # bb.start_app() #升级 bb.salerUpgrade(str(xlsx_salername), "huawei") cc = appdealerInformation(ip) cc.dealerstart_app() cc.dealerlogin(xlsx_dealername, xlsx_dealerpwd) cc.dealerUpgrade(str(xlsx_dealername)) bb.salerLog_banben(dealer[30], dealer[38]) cc.dealerBack() bb.start_app() bb.salerBack() # 修改密码 pwd1 = bb.salermodifypwd(xlsx_salerpwd, str(xlsx_salerpwd) + "new") print(pwd1[0], pwd1[1]) bb.salerlogintrue(xlsx_salername, pwd1[1]) cc.dealerstart_app() pwd2 = cc.dealerModifypwd(xlsx_dealerpwd, str(xlsx_dealerpwd) + "new", str(xlsx_dealerpwd) + "new") print(pwd2[0], pwd2[1]) cc.dealerlogin(xlsx_dealername, pwd2[1]) bb.salerLog_banben(dealer[30], dealer[39]) bb.start_app() # 惠聊 bb.salerHuionline(phonebrand) bb.salerAddshopping("5") # # cc.dealerlogin(u"14778786566",u"aa248163")#jxs登录 cc.dealerstart_app() cc.dealerHuionline() cc.dealerHuionline_youhuiquan() bb.salerHuionline_youhuiquan() bb.salerLog_banben(dealer[30], dealer[40]) time.sleep(4) bb.salerBack() time.sleep(3) bb.salerBack() # 预订单 bb.salerEnterstorehouse() bb.salerAddshopping_1() bb.salerEntershopping_Cart() # 购物车总价 tv_state = bb.salerEnterAdveeorder() print(tv_state) # 邀请码和备注#预订单的总价和应付额 sum_money_textview, actual_payment_textview = bb.salerAdverorder( int(saler[51]), saler[52]) print(sum_money_textview) print(actual_payment_textview) tv_order_money = bb.salerEnterOrder() print(tv_order_money) cc.dealerstart_app() cc.dealerBack() time.sleep(4) cc.dealerBack() bb.salerLog_banben(dealer[30], dealer[41]) # 选择送货员,确认订单,选择现金支付 #bb = appsalerInformation(ip) #cc = appdealerInformation(ip) cc.dealerOrder_confirm() bb.start_app() bb.finishorder() bb.salerLog_banben(dealer[30], dealer[42]) #cc.dealerBack() #time.sleep(3) #cc.dealerBack() # 退出登录 bb.salerloginOff() cc.dealerstart_app() cc.dealerOfflogin() #aa.wangyeQuit() bb.salerLog_banben(dealer[30], dealer[43])
# coding: utf-8 from wangye import wangyeInfomation from appsaler import appsalerInformation from appdealer import appdealerInformation import time if __name__ == '__main__': #(需要重写) #uat:"http://uat.wincrm.net:8218/","winretailsaler","win!@#" #retail:"http://retail.wincrm.net:8218/","wangbinsaler","71028863" # aa = wangyeInfomation() bb = appsalerInformation() cc = appdealerInformation() # aa.wangyeLogin("http://retail.wincrm.net:8203/","wangbinsaler","71028863") # aa.wangyeSwipetodown() # name = aa.wangyeOrder_problem_salerleixing(u"新自动化1","400","10","5","1") # aa.wangeyqiehuaniframe("menu1") # # #######uat:"//iframe[@src='http://uat.wincrm.net:8218/widgets/My97DatePicker/My97DatePicker.htm']",retail:"//iframe[@src='http://retail.wincrm.net:8203/widgets/My97DatePicker/My97DatePicker.htm']" # aa.wangyeOrder_problem_Setarea(name,name,u"汉西省",name,"//iframe[@src='http://retail.wincrm.net:8203/widgets/My97DatePicker/My97DatePicker.htm']" # ,"//iframe[@src='http://retail.wincrm.net:8203/widgets/My97DatePicker/My97DatePicker.htm']","500") bb.start_app() # bb.salerlogintrue("14778786561","aa248163") tv_exception1, tv_exception2, tv_exception3, ordercode = bb.salerOrder_problem1( "50", "50", "49") # print (tv_exception1) # print (tv_exception2) # print (tv_exception3) # print (ordercode) # cc.dealerstart_app() # result = cc.dealerAlterorder()#修改订单 # aa.wangeyqiehuaniframe("menu1")