示例#1
0
class LoginPage:
    appConfig = GoFunConfiguration.GoFunConfiguration()
    operater = Element_Operation()
    unlogin = appConfig.get("USER.UNLOGIN")
    username_box = appConfig.get("PHONE.NUM")
    username = appConfig.get("ACCOUNT.NUM")
    next_button = appConfig.get("LOGIN.NEXT")
    password_box = appConfig.get("LOGIN.CAPTCHA")
    password = appConfig.get("ACCOUNT.PASSWD")
    password = appConfig.get("ACCOUNT.PASSWD")

    def __init__(self):
        pass

    #登录-输入用户名
    def username_input(self):
        self.operater.set_text_by_id(self.username_box, self.username, "输入用户名")

    #登录-输入密码
    def password_input(self):
        self.operater.set_text_by_id(self.password_box, self.password, "输入用密码")

    #登录-next按钮
    def nextButton_click(self):
        self.operater.find_click_element(self.next_button, des="点击next按钮")

    #登录-“未登录”状态
    def unlogin_exist(self):
        return self.operater.exist("登录去!", "unlogin")

    def unlogin_click(self):
        self.operater.find_click_element(self.unlogin, des="点击登录按钮")
示例#2
0
class SettingPage:
    appConfig = GoFunConfiguration.GoFunConfiguration()
    operater = Element_Operation()
    switchButton = appConfig.get("SWITCH.BUTTON")
    agree = appConfig.get("READ.AGREE")

    def __init__(self):
        pass

    #个人中心-设置-接近还车网点提示
    def switchButton_exist(self):
        return self.operater.exist(self.switchButton, "存在【接近还车网点提示】")

    def switchButton_click(self):
        self.operater.find_click_element(self.switchButton, des="点击【接近还车网点提示】")

    #个人中心-设置- 给GoFun好评
    def gofunValuation_click(self):
        self.operater.find_click_element("给GoFun好评", des="给GoFun好评")

    def appStore_exist(self):
        return self.operater.xml_pic_pos("appstore_gofun")

    def gofunValuation_exist(self):
        return self.operater.exist("给GoFun好评", "给GoFun好评")

    #个人中心-设置- 关于我们
    def aboutUs_click(self):
        self.operater.find_click_element("关于我们", des="关于我们")

    #个人中心-设置- 微信公众号
    def weChatSubscription_exist(self):
        return self.operater.exist("微信公众号", "微信公众号")

    #个人中心-设置- 退出登录
    def exitAccount_exist(self):
        return self.operater.exist("退出登录", "退出登录")

    #个人中心-设置- 注销账户
    def logoff_click(self):
        self.operater.find_click_element("注销账户", des="注销账户")

    def logoff_exist(self):
        return self.operater.exist("注销账户", "注销账户")

    def logoffClaim_exist(self):
        return self.operater.exist("账户注销声明", "账户注销声明")

    def readAndAgree_click(self):
        self.operater.find_click_element(self.agree, des="点击【我已阅读并同意】")

    #个人中心-设置- 法律条款与平台规则
    def legalProvision_click(self):
        self.operater.find_click_element("法律条款与平台规则", des="点击【法律条款与平台规则】")

    def legalProvTitle_exist(self):
        #return self.operater.title_exist(text1="法律条款与平台规则")
        return self.operater.title_exist(text1="平台协议与规则")
示例#3
0
class HasCarNotiPage:
    appConfig = GoFunConfiguration.GoFunConfiguration()
    operater = Element_Operation()
    carReminder = appConfig.get("CAR.REMINDER")
    repeatDate = appConfig.get("CAR.REMINDER.REPEATDATE")
    startTime = appConfig.get("CAR.REMINDER.STARTTIME")
    selectTimeConf = appConfig.get("SELECT.TIME.SURE")
    findCarByType = appConfig.get("FIND.CAR.BYTYPE")

    def __init__(self):
        pass

    #主页-有车提醒
    def carReminder_click(self):
        self.operater.find_click_element(self.carReminder, des="点击有车提醒按钮")

    def carReminderTitle_exist(self):
        return self.operater.title_exist(text1="设置有车提醒")

    def repeatDate_click(self):
        self.operater.find_click_element(self.repeatDate, des="找车时间【重复】按钮")

    def repeatDateTitle_exist(self):
        return self.operater.title_exist(text1="选择重复日期")

    def startTime_click(self):
        self.operater.find_click_element(self.startTime, des="点击【开始时间】")

    def startTimeTitle_exist(self):
        return self.operater.title_exist(text1="选择找车开始时间")

    def endTimeTitle_exist(self):
        return self.operater.title_exist(text1="选择找车结束时间")

    def selectTimeConfirm_click(self):
        self.operater.find_click_element(self.selectTimeConf, des="点击【确认】")

    def findCarByType_click(self):
        self.operater.find_click_element(self.findCarByType, des="点击【全部车型】")

    def selectCarType_exist(self):
        return self.operater.exist("选择车型", des="选择车型")

    def confirmText_exist(self):
        return self.operater.exist("确定", des="确定")

    def confirmText_click(self):
        self.operater.find_click_element("确定", des="确定")
示例#4
0
class WalletPage:
    appConfig = GoFunConfiguration.GoFunConfiguration()
    operater = Element_Operation()
    encouragementTitle = appConfig.get("WALLET.ENCOURAGEMENT.TITLE")
    payWithoutPasswordTitle =appConfig.get("WALLET.PAYWIOPASSWORD.TITLE")
    encourageBack = appConfig.get("ENCOURAGE.HOMEPAGE.BACK")
    
    def __init__(self):
        pass
 
    #钱包-优惠券
    def coupon_click(self):
        self.operater.find_click_element("优惠券", des="点击【优惠券】")   
     
    def couponTitle_exist(self):
        return self.operater.title_exist(text1="优惠券")
    
    #钱包-优惠券-兑换
    def exchange_click(self):
        self.operater.find_click_element("兑换", des="点击【兑换】")
 
    def exchangeTitle_exist(self):
        return self.operater.title_exist(text1="优惠券兑换") 

    #钱包-免密支付
    def payWithoutPassword_click(self):
        self.operater.find_click_element("免密支付", des="点击【免密支付】")
    #图片识别
    def payWithoutPasswordTitle_exist(self):
        return self.operater.xml_pic_pos(self.payWithoutPasswordTitle)

    #钱包-鼓励金
    def encouragement_exist(self):
        return self.operater.exist("鼓励金", "存在【鼓励金】")  
        
    def encouragement_click(self):
        self.operater.find_click_element("鼓励金", des="点击【鼓励金】")   
     
    def encouragementTitle_exist(self):
        return self.operater.title_exist(id=self.encouragementTitle, text1="鼓励金")
        
    def encouragementBack_click(self):
        self.operater.find_click_element(self.encourageBack, des="点击【鼓励金后退键】") 

    #钱包-履约保证金
    def deposit_click(self):
        self.operater.find_click_element("履约保证金", des="点击【履约保证金】")
 
    def depositTitle_exist(self):
        return self.operater.title_exist(text1="履约保证金") 
 
    #钱包-发票与报销
    def receipt_click(self):
        self.operater.find_click_element("发票与报销", des="点击【发票与报销】")
 
    def receiptTitle_exist(self):
        return self.operater.title_exist(text1="发票与报销")  

    #钱包-出行卡
    def travelCard_exist(self):
        return self.operater.exist("出行卡",  "存在【出行卡】")  
        
    def travelCard_click(self):
        self.operater.find_click_element("出行卡", des="点击【出行卡】")
 
    def travelCardTitle_exist(self):
        return self.operater.title_exist(text1="出行卡") 
 
    #钱包-出行卡-购卡历史
    def travelCardHis_click(self):
        self.operater.find_click_element("购卡历史", des="点击【购卡历史】")
 
    def travelCardHisTitle_exist(self):
        return self.operater.title_exist(text1="购卡历史")  
示例#5
0
class PayPage:
    appConfig = GoFunConfiguration.GoFunConfiguration()
    operater = Element_Operation()
    insurance_list = appConfig.get("SETTLEMENT.INSURANCE")
    pay = appConfig.get("PAY.CAR.CONFIRM")
    chooseCoupons = appConfig.get("CHOOSE.COUPONS.FOR.SETTLE")
    selectCoupon = appConfig.get("SELECT.COUPONS")
    evaluate = appConfig.get("EVALUATE.ORDER")
    evaluateClose = appConfig.get("EVALUATE.CLOSE.BUTTON")
    toHome = appConfig.get("TRAVEL.END.TO.HOMEPAGE")
    backArrow = appConfig.get("COUPON.BACK")
    dailyPayBackArrow = appConfig.get("CANCEL.DAILY.ORDER")

    def __init__(self):
        pass

    def get_insuranceList(self):
        return self.operater.find_element(self.insurance_list,
                                          "[Settle]: insurance list")

    def pay_click(self):
        self.operater.find_click_element(self.pay,
                                         des="[Return car], [return & settle]")

    #立体车位
    def litiParking_exist(self):
        return self.operater.exist("正确选择车辆停放位置", "立体车位:还车确认")

    # 确认车位并锁车
    def confirmAndLock_click(self):
        self.operater.find_click_element("确认车位并锁车", "reserve car commit")

    #非立体车位
    def NonLitiParking_exist(self):
        return self.operater.exist("还车确认事项", "非立体车位,还车确认")

    # 还车
    def returnCar_click(self):
        self.operater.find_click_element("还车", "还车")

    #有可用优惠券
    def hasCoupons_exist(self):
        return self.operater.exist("您有未使用的优惠券", "You have unused coupons")

    #使用优惠券结算
    def chooseCoupons_click(self):
        self.operater.find_click_element(self.chooseCoupons,
                                         "use coupons for settlement")

    #选择优惠券
    def selectCoupon_click(self):
        self.operater.find_click_element(self.selectCoupon,
                                         "select new user coupons")

    #评价
    def evaluateOrder_exist(self):
        return self.operater.exist(self.evaluate, "提示:请您评价本次行程的用车感受~,存在!")

    #关闭评价
    def evaluateClose_click(self):
        self.operater.find_click_element(self.evaluateClose, "点击评价页面关闭按钮")

    #行程完成
    def travelFinish_exist(self):
        return self.operater.exist("行程完成", "行程完成")

    #行程完成返回home
    def backToHome_exist(self):
        return self.operater.exist(self.toHome, "判定是否存在:[to homepage]")

    def backToHome_click(self):
        self.operater.find_click_element(self.toHome, "点击返回home")

    #日租账单页
    def dailyPay_exist(self):
        return self.operater.exist("日租账单", "【日租账单】页面")

    def dailyPayBackArrow_click(self):
        self.operater.find_click_element(self.dailyPayBackArrow, "点击【后退】按钮")

    #行程账单
    def tripBill_exist(self):
        return self.operater.exist("行程账单", "【行程账单】页面")

    def byCarIntTitle_exist(self):
        return self.operater.title_exist(text1="购车意向调查")

    def byCarIntTitle2_exist(self):
        return self.operater.title_exist(text1="问卷调查")
示例#6
0
class PickingPage:
    appConfig = GoFunConfiguration.GoFunConfiguration()
    operater = Element_Operation()
    freeReturn = appConfig.get("GOING.RETURN.CAR")
    pickingVoice = appConfig.get("PICKING.VOICE.FIND")
    pickFaceRec = appConfig.get("PICKING.FACE.RECOGNITION")
    useCar = appConfig.get("PICKING.USE.CAR")
    specificReason = appConfig.get("SPECIFIC.REASON")
    commitButton = appConfig.get("COMMIT.BUTTON")
    reasonArrow = appConfig.get("REASON.ARROW")
    nevigate = appConfig.get("NAVIGATION.BUTTON")
    nevLogout = appConfig.get("NAVIGATION.LOGOUT")
    nevLogoutConfirm = appConfig.get("NAVIGATION.LOGOUT.SURE")
    titleId = appConfig.get("NATIVE.TITLE.TRIP")

    def __init__(self):
        pass

    def freeReturn_exist(self):
        return self.operater.exist("免费还车", "存在【免费还车】")

    #取车页面
    def pickingCar_exist(self):
        return self.operater.exist("取车中", "[Title] Picking-up car")

    #取车页面-声音寻车
    def pickingVoice_click(self):
        self.operater.find_click_element(self.pickingVoice,
                                         des="[voice find car]")

    #人脸识别
    def faceRecButton_exist(self):
        return self.operater.exist(self.pickFaceRec, "取车中:人脸识别按钮")

    #取车页面-用车
    def useCar_click(self):
        self.operater.find_click_element(self.useCar, des="user car")

    #车况上报-上报完毕
    def reportFinish_exist(self):
        return self.operater.exist("上报完毕", des="上报完毕")

    def reportFinish_click(self):
        self.operater.find_click_element("上报完毕", des="上报完毕")

    #取消订单
    def cancleOrder_exist(self):
        return self.operater.exist("取消订单", "取消订单")

    def cancleOrder_click(self):
        self.operater.find_click_element("取消订单", "取消订单")

    def cancleConfirm_exist(self):
        return self.operater.exist("确定取消本次订单?", "confirm cancel oder?")

    def cancleOrderSuc_exist(self):
        return self.operater.exist("订单已取消", "text:【订单已取消】")

    #取消订单具体原因
    def specificReason_exist(self):
        return self.operater.exist(self.specificReason, "检测是否存在【具体原因】")

    def specificReason_click(self):
        self.operater.find_click_element(self.specificReason, "点击【具体原因】")

    def commitButton_click(self):
        self.operater.find_click_element(self.commitButton, "点击【提交】按钮")

    def reasonArrow_exist(self):
        return self.operater.exist(self.reasonArrow, "检测是否存在【原因箭头】")

    def reasonArrow_click(self):
        self.operater.find_click_element(self.reasonArrow, "点击【原因箭头】")

    #导航
    def nevigate_click(self):
        self.operater.find_click_element(self.nevigate, "点击【取车界面导航】按钮")

    def nevigate1_exist(self):
        return self.operater.exist('站内导航', '判断是否存在【站内导航】')

    def nevigate1_click(self):
        self.operater.find_click_element('站内导航', '点击【站内导航】')

    def builtInNevigate_exist(self):
        return self.operater.exist('内置导航', '判断是否存在【内置导航】')

    def builtInNevigate_click(self):
        self.operater.find_click_element('内置导航', '点击【内置导航】')

    def nevLogout_click(self):
        self.operater.find_click_element(self.nevLogout, '点击导航界面退出按钮')

    def nevLogoutConfirm_click(self):
        self.operater.find_click_element(self.nevLogoutConfirm, '点击导航界面退出导航按钮')

    #结算订单
    def settleOrder_exist(self):
        return self.operater.exist("结算订单", "[Picking-up] [Settlement]")

    def settleOrder_click(self):
        self.operater.find_click_element("结算订单", "[Picking-up] [Settlement]")

    def settleOrderComfirm_exist(self):
        return self.operater.exist("确定结算订单?", "Dialog [Confirm cancel order?]")
示例#7
0
class HomePage:
    appConfig = GoFunConfiguration.GoFunConfiguration()
    operater = Element_Operation()
    homeMenu = appConfig.get("HOME.MENU")
    homeTips = appConfig.get("HOME.MOVE.TIPS")
    homeAdClose = appConfig.get("ALERT.AD.CLOSE.ID")
    homeGo = appConfig.get("HOME.GO")
    location = appConfig.get("HOME.LOCATION")
    homeAccident = appConfig.get("ACCIDENT.ICON")
    homeClean = appConfig.get("CLEAN.ICON")
    homeService = appConfig.get("HOME.SERVICE")
    homeMessage = appConfig.get("MESSAGE.MENU")
    messageNotification = appConfig.get("MESSAGE.TAB")
    messageList = appConfig.get("MESSAGE.LIST")
    homeCard = appConfig.get("HOME.CARD")
    homeCard_two = appConfig.get("HOME.CARD.TWO")
    carListItem = appConfig.get("CARD.LIST.ITEM")
    localCity = appConfig.get("LOCAL.CITY")
    city_list = appConfig.get("CITY.LIST")
    cityName = appConfig.get("CITY.ID")
    ivGuess = appConfig.get("HOME.IV.GUESS")
    returnSameTak = appConfig.get("RETURN.SAME.TAKING")
    returnSameTak_yuyue = appConfig.get("RETURN.SAME.TAKING.TWO")
    yuyue = appConfig.get("YUYUE.TAB")
    yuyuePic = appConfig.get("HOME.YUYUE.PICNAME")
    yuyueCancel = appConfig.get("YUYUE.CACEL")
    yuyueCancel_daily = appConfig.get("YUYUE.CACEL.DAILY")
    wholeRCar = appConfig.get("WHOLERENT.CAR.PIC")
    wholeRAgree = appConfig.get("WHOLERENT.AGREE")
    titleId = appConfig.get("NATIVE.TITLE.TRIP")
    cityPic = appConfig.get("HOME.CITY.PICNAME")
    tuhuiAddress = appConfig.get("TEHUI.ADDRESS")
    Cancel_daily = appConfig.get("CACEL.DAILY")  #546 日租账单取消增加二次确认

    def __init__(self):
        pass

    #主页-menu
    def menu_exist(self):
        return self.operater.exist(self.homeMenu, "存在【主页menu】图标")

    def menu_click(self):
        self.operater.find_click_element(self.homeMenu, des="点击【主页menu】图标")

    #主页-广告
    def adClose_exist(self):
        return self.operater.exist(self.homeAdClose, "存在【关闭广告】按钮")

    def adClose_click(self):
        self.operater.find_click_element(self.homeAdClose, des="点击【关闭广告】按钮")

    #主页-挪动提示
    def tips_exist(self):
        return self.operater.exist(self.homeTips, "存在区块链及go券商城挪动提示")

    def tips_click(self):
        self.operater.find_click_element(self.homeTips, des="点击区块链及go券商城挪动提示")

    #主页-go按钮
    def goButton_exist(self):
        return self.operater.exist(self.homeGo, "存在【Go】按钮")

    def goButton_click(self):
        self.operater.find_click_element(self.homeGo, des="点击【Go】按钮")

    #主页-位置刷新
    def location_exist(self):
        return self.operater.exist(self.location, "存在【位置刷新】按钮")

    def location_click(self):
        self.operater.find_click_element(self.location, des="点击【位置刷新按钮】")

    #主页-事故出险
    def accident_exist(self):
        return self.operater.exist(self.homeAccident, "存在【事故出险】图标")

    #主页-清洁奖余额
    def clean_exist(self):
        return self.operater.exist(self.homeClean, "存在【清洁奖余额】图标")

    #主页-客服
    def customService_exist(self):
        return self.operater.exist(self.homeService, "存在【客服】图标")

    def customService_click(self):
        self.operater.find_click_element(self.homeService, des="点击【客服】图标")

    #主页-模拟位置
    def locationSimulate_exist(self):
        return self.operater.exist("模拟位置", "存在【模拟位置】图标")

    #主页-消息流
    def messageMenu_click(self):
        self.operater.find_click_element(self.homeMessage, des="点击【消息】图标")

    def messageTitle_exist(self):
        return self.operater.title_exist(text1="消息流")

    #主页-消息流-通知你的事
    def notification_click(self):
        self.operater.find_click_element(self.messageNotification,
                                         des="点击【通知你的事】")

    #主页-消息流-消息列表
    def messageList_exist(self):
        return self.operater.exist(self.messageList, "消息列表")

    #主页-消息流-查看详情
    def checkDetail_exist(self):
        return self.operater.exist("查看详情", "存在【查看详情】")

    def checkDetail_click(self):
        self.operater.find_click_element("查看详情", des="点击【查看详情】")

    #主页-有车提醒
    def openCarNoti_exist(self):
        return self.operater.exist("开启该网点有车提醒", "存在【开启该网点有车提醒】图标")

    #主页-无可用车辆
    def noCar_exist(self):
        return self.operater.exist("该网点暂无可用车辆", "有车提醒")

    #主页-车辆卡片c
    def homeCard_exist(self):
        return self.operater.exist(self.homeCard, "Homepage card list")

    def homeCard_click(self):
        self.operater.find_click_element(self.homeCard,
                                         des="Homepage card list")

    def homeCard_two_exist(self):
        return self.operater.exist(self.homeCard_two, "Homepage card list")

    def homeCard_two_click(self):
        self.operater.find_click_element(self.homeCard_two,
                                         des="Homepage card list")

    #主页-车辆卡片,返回 车辆列表
    def getCardList(self):
        homeCard = self.operater.find_element(self.homeCard,
                                              "Homepage card list")
        cardList = homeCard.child(self.carListItem)
        return cardList

    #主页-城市
    def localCity_exist(self):
        return self.operater.exist(self.localCity, "主页设置城市")

    def localCity_click(self):
        self.operater.find_click_element(self.localCity, des="主页设置城市")

    #主页-城市-城市列表
    def cityList_exist(self):
        return self.operater.exist(self.city_list, "城市列表")

    def getcityName(self):
        return self.operater.get_text(self.cityName, "城市名称")

    def cityName_click(self, name):
        self.operater.find_click_element(name, des="城市名称:%s" % name)

    def cityName_exist(self, name):
        return self.operater.exist(name, des="城市名称:%s" % name)

    def clever_wait(self, item, num=15):
        return self.operater.clever_wait(item, num)

    #主页-分时
    def timeD_click(self):
        self.operater.find_click_element("分时", "点击【分时】按钮")

    #主页-日租
    def daily_click(self):
        self.operater.find_click_element("日租", "点击【日租】按钮")

    #主页-特惠
    def tehui_click(self):
        self.operater.find_click_element("特惠车", "点击【特惠车】按钮")

    #主页-整租
    def wholeR_click(self):
        self.operater.find_click_element("整租", "点击【整租】按钮")

    #主页-同取同还
    def returnSameTak_exist(self):
        return self.operater.exist(self.returnSameTak, "同取同还")

    def returnSameTak_click(self):
        self.operater.find_click_element(self.returnSameTak, des="同取同还")

    #主页-同取同还-预约
    def returnSameTak_yuyue_exist(self):
        return self.operater.exist(self.returnSameTak_yuyue, "预约-同取同还")

    def returnSameTak_yuyue_click(self):
        self.operater.find_click_element(self.returnSameTak_yuyue,
                                         des="预约-同取同还")

    def ivGuess_exist(self):
        return self.operater.exist(self.ivGuess, "iv Guess")

    def ivGuess_click(self):
        self.operater.find_click_element(self.ivGuess, des="iv Guess")

    #判断给定元素是否存在
    def item_exist(self, item, des):
        return self.operater.exist(item, des)

    def item_click(self, item, des):
        self.operater.find_click_element(item, des)

    #预约tab
    def yuyueTab_exist(self):
        return self.operater.exist(self.yuyue, "是否存在【预约】TAB")

    #预约图片
    def yuyue_click(self):
        self.operater.xml_pic_click(self.yuyuePic)

    #分时-预约
    def yuyue_getTitle(self):
        return self.operater.get_text(self.titleId, "获取标题")

    def yuyue_waitDistribute_exist(self):
        return self.operater.title_exist(self.titleId, "等待派送")

    #取消分时-预约
    def yuyueCancel_click(self):
        return self.operater.find_click_element(self.yuyueCancel, "点击【取消】按钮")

    #确认取消预约
    def yuyueCancel_confrim_exist(self):
        return self.operater.exist(self.titleId, "确定取消本次订单?")

    #日租-预约
    def yuyueDaily_pay_exist(self):
        return self.operater.exist("支付", "进入【账单】界面")

    #取消日租-预约
    def yuyueCancel_daily_click(self):
        return self.operater.find_click_element(self.yuyueCancel_daily,
                                                "点击【取消】按钮")

    #整租车辆图片
    def wholeRCar_exist(self):
        return self.operater.exist(self.wholeRCar, "判断是否存在【车辆图片】")

    def wholeRCar_click(self):
        return self.operater.find_click_element(self.wholeRCar, "点击【车辆图片】")

    #预定整租
    def wholeReserve_exist(self):
        return self.operater.exist("预定整租", "判断是否存在【预定整租】按钮")

    def wholeReserve_click(self):
        return self.operater.find_click_element("预定整租", "点击【预定整租】")

    def wholeRAgree_click(self):
        return self.operater.find_click_element(self.wholeRAgree,
                                                "点击【同意整租规则说明】")

    def wholeRSuc_exist(self):
        return self.operater.exist("整租受理中", "判断是否存在【整租受理中】")

    #取消预定
    def wholeRCancel_exist(self):
        return self.operater.exist("取消预定", "判断是否存在【取消预定】")

    def wholeRCancel_click(self):
        return self.operater.find_click_element("取消预定", "点击【取消预定】")

    def homeCityPic_exist(self):
        return self.operater.self.xml_pic_pos(self.cityPic)

    def tehui_exist(self):
        return self.operater.exist("场次预告", "判断是否存在【场次预告】")

    def tehui_exist1(self):
        return self.operater.exist(self.tuhuiAddress, "判断是否存在【特惠车地址栏】")

    #539版本添加,关闭广告后有用车tip
    def tipNextPage_exist(self):
        return self.operater.exist("下一页", "判断是否存在【下一页】")

    def tipNextPage_click(self):
        return self.operater.find_click_element("下一页", "点击【下一页】")

    def tipClose_exist(self):
        return self.operater.exist("关闭", "判断是否存在【关闭】")

    def tipClose_click(self):
        return self.operater.find_click_element("关闭", "点击【关闭】")

    # 取消日租-日租账单-546增加二次确认弹框
    def Cancel_daily_click(self):
        return self.operater.find_click_element(self.Cancel_daily,
                                                "点击【取消订单】按钮")
class PersonalCenterPage:
    appConfig = GoFunConfiguration.GoFunConfiguration()
    operater = Element_Operation()
    walletTitle= appConfig.get("WALLET.TITLE")
    tripTitle = appConfig.get("NATIVE.TITLE.TRIP")
    tripList = appConfig.get("TRIP.LIST")
    keyboard = appConfig.get("ALERT.AD.CLOSE.ID")
    medalMenu = appConfig.get("MEDAL.MENU")
    myMedal = appConfig.get("MY.MEDAL")
    wmf = appConfig.get("WMF.MENU")
        
    def __init__(self):
        pass
 
    #个人中心-钱包
    def wallet_exist(self):
        return self.operater.exist("钱包", "存在【钱包】")

    def wallet_click(self):
        self.operater.find_click_element("钱包", des="点击【钱包】")

    def walletTitle_exist(self):
        return self.operater.title_exist(text1=self.walletTitle)

    #个人中心-行程
    def trip_click(self):
        self.operater.find_click_element("行程", des="点击【行程】")

    def tripTitle_exist(self): 
        return self.operater.title_exist(id=self.tripTitle, text1="行程") 
        
    def tripList_exist(self):
        return self.operater.exist(self.tripList, "存在【行程列表】")
        
    def tripList1_click(self):
        self.operater.atx_d(self.tripList).child()[0].click()
        
    def tripList2_click(self):
        self.operater.atx_d(self.tripList).child()[1].click()
     
    #个人中心-邀请有礼
    def invitation_click(self):
        self.operater.find_click_element("邀请有礼", des="点击【邀请有礼】")

    def invitateFriends_exist(self):
        return self.operater.exist("邀请好友", "存在【邀请好友】")
        
    def invitateRule_exist(self):
        return self.operater.exist("规则", "存在【规则】")
        
    def invitateRule1_exist(self):
        return self.operater.exist("邀请规则", "存在【邀请规则】")
    
    #键盘
    def keyboard_exist(self):
        return self.operater.exist(self.keyboard, "存在【键盘】")
        
    def keyboard_click(self):
        self.operater.find_click_element(self.keyboard, des="关闭【键盘】")
 
    #个人中心-交通违法
    def illegalTraffic_click(self):
        self.operater.find_click_element("交通违法", des="点击【交通违法】")
        
    def illegalTrafficTitle_exist(self):
        return self.operater.title_exist(text1="交通违法") 

    #个人中心-设置
    def setting_click(self):
        self.operater.find_click_element("设置", des="点击【设置】")
        
    def settingTitle_exist(self):
        return self.operater.title_exist(text1="设置") 
        
     #个人中心-我的勋章
    def medal_click(self):
        self.operater.find_click_element(self.medalMenu, des="点击【我的勋章】")
        
    def medalTitle_exist(self):
        return self.operater.exist(self.myMedal, "存在【我的勋章】")

     #个人中心-文明用车分
    def wmf_click(self):
        self.operater.find_click_element(self.wmf, des="点击【文明用车分】")
        
    def wmfTitle_exist(self):
        return self.operater.exist('文明用车分', "判断是否出现【文明用车分】")

     #个人中心-Go券商城
    def coupon_click(self):
        self.operater.find_click_element("Go券商城", "点击【Go券商城】")
        
    def coupon_exist(self):
        return self.operater.exist("Go券商城", "判定是否存在【Go券商城】")
        
    def couponHis_click(self):
        self.operater.find_click_element("购买记录", "点击【购买记录】")
        
    def couponHis_exist(self):
        return self.operater.exist("购买记录", "判定是否存在【购买记录】")
        
    def couponHisTitle_exist(self):
        return self.operater.title_exist(text1="购买记录") 
示例#9
0
class Dialog:
    appConfig = GoFunConfiguration.GoFunConfiguration()
    operater = Element_Operation()
    positive = appConfig.get("DIALOG.POSITIVE.ID")
    dismiss = appConfig.get("DIALOG.DISMISS")
    cancel = appConfig.get("DIALOG.CANCEL")
    content = appConfig.get("DIALOG.CONTENT")
    backArrow = appConfig.get("BACK.ARROW")
    freeReturnTitle = appConfig.get("NATIVE.TITLE.TRIP")
    lockToPay = appConfig.get("DIALOG.CLOSEDOOR.ID")
    backArrow1 = appConfig.get("COUPON.BACK")

    def __init__(self):
        pass

    def confirm_exist(self):
        return self.operater.exist(self.positive,
                                   "存在【确认/确认预定/仍然预定/我知道了/继续下单/确认开门/确认免费还车】按钮")

    def confirm_click(self):
        self.operater.find_click_element(
            self.positive, des="点击【确认/确认预定/仍然预定/我知道了/继续下单/确认开门/确认免费还车】按钮")

    def dismiss_exist(self):
        return self.operater.exist(self.dismiss, "存在【我知道了】按钮")

    def dismiss_click(self):
        self.operater.find_click_element(self.dismiss, des="点击【我知道了】按钮")

    def cancel_exist(self):
        return self.operater.exist(self.cancel, "存在【继续用车/取消/停止找车】按钮")

    def cancel_click(self):
        self.operater.find_click_element(self.cancel, des="点击【继续用车/取消/停止找车】按钮")

    def agree_exist(self):
        return self.operater.exist("同意", "存在【同意】按钮")

    def agree_click(self):
        self.operater.find_click_element("同意", des="点击【同意】按钮")

    def faceRec_exist(self):
        return self.operater.exist("请完成面部识别", "存在【请完成面部识别】提示")

    def later_click(self):
        self.operater.find_click_element("稍后再说", des="点击【稍后再说】按钮")

    def takeCarOverTime_exist(self):
        return self.operater.exist("取车已超时", "存在【取车已超时】提示")

    def dialog_exist(self, dialogTitle, des):
        return self.operater.exist(dialogTitle, des)

    def iKnowText_exist(self):
        return self.operater.exist("我知道了", "存在【我知道了】")

    def iKnowText_click(self):
        self.operater.find_click_element("我知道了", des="点击【我知道了】")

    def confirmText_click(self):
        self.operater.find_click_element("确定", des="点击【确定】")

    def confirmText_exist(self):
        return self.operater.exist("确定", "存在【确定】")

    #dialog-温馨提示
    def warmTipContent_exist(self):
        return self.operater.exist(self.content, "【温馨提示】-内容")

    def getWarmTipContent(self):
        return self.operater.get_text(self.content, "【温馨提示】-内容")

    #dialog-开门用车提示
    def openDoorTip_exist(self):
        return self.operater.exist("准备就绪", "提示框:【准备就绪】-关于开门提示")

    #dialog-首次用车提示
    def firstExperience_exist(self):
        return self.operater.exist("您首次体验该车型", "[Dialog]First Experience")

    #后退箭头
    def backArrow_click(self):
        self.operater.find_click_element(self.backArrow, des="点击后退按钮")

    #dialog-免费还车提示框
    def freeReturnTitle_exist(self):
        return self.operater.title_exist(id=self.freeReturnTitle, text1="免费还车")

    #dialog-已经免费还车提示框
    def finishFreeReturnTitle_exist(self):
        return self.operater.title_exist(id=self.freeReturnTitle,
                                         text1="免费还车成功")

    #账单页-请完成以下事项
    def finishBelowItem_exist(self):
        return self.operater.exist("请完成以下事项",
                                   "[Dialog]Please finish bellow items")

    #账单页-锁车前请确认以下事项
    def confirmBeforeReturn_exist(self):
        return self.operater.exist("锁车前请确认以下事项", "Dialog[Confirm return]")

    #账单页-确认还车
    def confirmReturn_exist(self):
        return self.operater.exist("确认还车", "Dialog[Confirm return]")

    #锁车并结算
    def closeDoor_click(self):
        self.operater.find_click_element(self.lockToPay, des="锁车并结算")

    #后退箭头
    def backArrow1_exist(self):
        return self.operater.exist(self.backArrow1, "判定是否存在:返回按钮")

    def backArrow1_click(self):
        self.operater.find_click_element(self.backArrow1, "点击【<】按钮")

    def nevigateTipTitle_exist(self):
        return self.operater.title_exist(id=self.freeReturnTitle, text1="提示")

    def nevigateTooFar_exist(self):
        return self.operater.title_exist(id=self.content,
                                         text1="选择导航距离过远,请重试!")

    #543,整租取消订单-“确认取消”
    def confirmCancel_exist(self):
        return self.operater.exist("确认取消", "存在[确认取消]按钮")

    def confirmCancel_click(self):
        self.operater.find_click_element("确认取消", "点击[确认取消]按钮")
示例#10
0
class ReservePage:
    appConfig = GoFunConfiguration.GoFunConfiguration()
    operater = Element_Operation()
    advInsurance = appConfig.get("ADVANCED.INSURANCE")
    copyAddress = appConfig.get("RESERVE.COPY.ADDRESS")
    shuoming = appConfig.get("RESERVE.SHUOMING")
    commit = appConfig.get("RESERVE.COMMIT")
    commit1 = appConfig.get("RESERVE.COMMIT1")
    yuyueTime_button = appConfig.get("SELECT.TIME.BUTTON")
    yuyueTime_confirm = appConfig.get("SELECT.TIME.SURE")
    timeOption = appConfig.get("TIME.OPTION")

    def __init__(self):
        pass

    #订单页-三者无忧
    def advInsurance_exist(self):
        return self.operater.exist(self.advInsurance, "advanced insurance")

    #订单页-取车点非同取同还
    def copyAddress_exist(self):
        return self.operater.exist(self.copyAddress,
                                   "return park: copy take park")

    def copyAddress_click(self):
        self.operater.find_click_element(self.copyAddress,
                                         "return park: copy take park")

    #订单页-说明
    def shuoming_exist(self):
        return self.operater.exist(self.shuoming, "说明")

    def shuoming_click(self):
        self.operater.find_click_element(self.shuoming, "点击【说明】")

    #订单页-确认签署并下单
    def commit_exist(self):
        return self.operater.exist(self.commit, "确认签署并下单")

    def commit_click(self):
        self.operater.find_click_element(self.commit, "点击【确认签署并下单】")

    def commit1_exist(self):
        return self.operater.exist(self.commit1, "确认签署并下单")

    def commit1_click(self):
        self.operater.find_click_element(self.commit1, "点击【确认签署并下单】")

    #订单页-仍然预定
    def reserveStill_exist(self):
        return self.operater.exist("本网点车辆只能还回本网点。是否仍要预定?", "仍然预定")

    #订单页-温馨提示框
    def warmTip_exist(self):
        return self.operater.exist("温馨提示", "warm tip")

    #订单页-车辆已被他人预订
    def reserveByOther_exist(self):
        return self.operater.exist("车辆已被他人预订,请选择其他车辆", "reserved by other")

    #订单页-成功预定
    def reserveSuc_exist(self):
        return self.operater.exist("已成功预定", "[Reserved success]")

    def noteTitle_exist(self):
        return self.operater.title_exist(text1="提示")

    #预约-时间
    def yuyueTime_button_click(self):
        self.operater.find_click_element(self.yuyueTime_button, "选择预约取车时间")

    #预约-时间确认
    def yuyueTime_confirm_click(self):
        self.operater.find_click_element(self.yuyueTime_confirm, "选择预约取车时间")

    def getTimeOption(self):
        return self.operater.find_element(self.timeOption, "预约时间:日期")

    def selectTime_exist(self):
        return self.operater.exist("请选择预约取车时间", "判断是否存在【请选择预约取车时间】")
示例#11
0
class TripDetailPage:
    appConfig = GoFunConfiguration.GoFunConfiguration()
    operater = Element_Operation()
    costDetail = appConfig.get("COAST.DETAILS")

    def __init__(self):
        pass

    #设置-行程-行程详情
    def tripDetail_exist(self):
        return self.operater.exist("行程详情", "存在【行程详情】")

    #设置-行程-行程详情-自助服务
    def autoService_click(self):
        self.operater.find_click_element("自助服务", des="点击【自助服务】")

    def autoService_exist(self):
        return self.operater.exist("自助服务", "存在【自助服务】")

    def feePayment_exist(self):
        return self.operater.exist("费用缴纳", "存在【费用缴纳】")

    def illegalTraffic_exist(self):
        return self.operater.exist("交通违法处理", "存在【交通违法处理】")

    def cancel_exist(self):
        return self.operater.exist("取消", "存在【取消】")

    def cancel_click(self):
        self.operater.find_click_element("取消", des="点击【取消】")

    #设置-行程-行程详情-费用明细
    def feeDetail_exist(self):
        return self.operater.exist(self.costDetail, "存在【费用明细】")

    def feeDetail_click(self):
        self.operater.find_click_element(self.costDetail, des="点击【费用明细】")

    #设置-行程-行程详情-费用明细-查看计费规则
    def seeFeeRule_click(self):
        self.operater.find_click_element("查看计费规则", des="点击【查看计费规则】")

    def feeRule_exist(self):
        return self.operater.exist("计价规则", "存在【计价规则】")

    def dailyRule_exist(self):
        return self.operater.exist("日租规则", "存在【日租规则】")

    #设置-行程-行程详情-看车况
    def carStatus_click(self):
        self.operater.find_click_element("看车况", des="点击【看车况】")

    def carPicture_exist(self):
        return self.operater.exist("验车照片", "存在【验车照片】")

    def clever_wait(self, item, num=15):
        return self.operater.clever_wait(item, num)

    #设置-行程-行程详情-开发票
    def invoice_click(self):
        self.operater.find_click_element("开发票", "点击【开发票】")

    def invoiceAndReimbursement_exist(self):
        return self.operater.exist("发票与报销", "存在【发票与报销】")

    #设置-行程-行程详情-报问题
    def report_click(self):
        self.operater.find_click_element("报问题", "点击【报问题】")

    def reportTitle_exist(self):
        return self.operater.exist("问题上报", "存在【问题上报】")
示例#12
0
class GoingPage:
    appConfig = GoFunConfiguration.GoFunConfiguration()
    operater = Element_Operation()
    toReturnCar = appConfig.get("GOING.RETURN.CAR")
    carHealth = appConfig.get("GOING.CAR.HEALTH")
    sofarClose = appConfig.get("GOING.SOFAR.CLOSE")
    healthClose = appConfig.get("GOING.HEALTH.CLOSE.BUTTON")
    powerNotEnough = appConfig.get("POWER.TIP")
    guessParking = appConfig.get("GOING.GUESS.PARKING")
    changeCar = appConfig.get("GOING.CHANGE.CAR")
    tripCarImage = appConfig.get("TRIP.CAR.IMG")
    issueReport = appConfig.get("ISSUE.REPORT")
    openDoor = appConfig.get("GOING.OPEN.DOOR")
    closeDoor = appConfig.get("GOING.CLOSE.DOOR")
    voiceFind = appConfig.get("GOING.VOICE.FIND")
    freeReturn = appConfig.get("FREE.RETURN")
    nextButton = appConfig.get("DIALOG.CLOSEDOOR.ID")
    closeInterfaceTitle = appConfig.get("CLOSE.INTERFACE")

    def __init__(self):
        pass

    #行程中-去还车
    def toReturnCar_exist(self):
        return self.operater.exist(self.toReturnCar, "存在【去还车】按钮")

    def toReturnCar_click(self):
        self.operater.find_click_element(self.toReturnCar, des="点击【去还车】按钮")

    #行程中-车辆太远
    def soFarClose_exist(self):
        return self.operater.exist(self.sofarClose, "存在【车辆太远关闭】按钮")

    def soFarClose_click(self):
        self.operater.find_click_element(self.sofarClose, des="点击【车辆太远关闭】按钮")

    #行程中-车内卫生清洁
    def carHealth_exist(self):
        return self.operater.exist(self.carHealth, "车内卫生清洁")

    def healthClose_click(self):
        self.operater.find_click_element(self.healthClose,
                                         des="点击【车内卫生清洁关闭】按钮")

    #行程中-电量不足
    def powerNotEnough_exist(self):
        return self.operater.exist(self.powerNotEnough, "电量不足")

    #行程中-
    def guessParking_exist(self):
        return self.operater.exist(self.guessParking,
                                   "[Guess where you want to go]")

    #行程中-换车
    def changeCar_exist(self):
        return self.operater.exist(self.changeCar, "换车")

    #行程中
    def tripGoing_exist(self):
        return self.operater.exist("行程中", "[Goging]")

    #行程中-问题上报
    def issueReport_exist(self):
        return self.operater.exist(self.issueReport, "存在【问题上报】图标")

    def openDoor_click(self):
        self.operater.find_click_element(self.openDoor, des="点击【开门】")

    def closeDoor_click(self):
        self.operater.find_click_element(self.closeDoor, des="点击【关门】")

    def voiceFind_click(self):
        self.operater.find_click_element(self.voiceFind, des="点击【寻车】")

    #行程中-免费还车等待时间
    def freeReturnTime_exist(self):
        return self.operater.exist(self.freeReturn, "存在【免费还车等待时间】")

    #行程中-免费还车按钮
    def freeReturn_click(self):
        self.operater.find_click_element("免费还车", "[Free Return] bottom button")

    #还车-选择车辆停放位置
    def selectParkLoc_exist(self):
        return self.operater.exist("选择车辆停放位置", "存在:选择车辆停放位置")

    #还车-下一步
    def nextButton_click(self):
        self.operater.find_click_element(self.nextButton, "点击:下一步按钮")

    #拉手刹
    def closeInterfaceTitle_exist(self):
        return self.operater.title_exist(id=self.closeInterfaceTitle,
                                         text1="拉手刹")

    #还车-锁车停止计费
    def closeDoorToPay_click(self):
        self.operater.find_click_element(self.nextButton, "【锁车停止计费】")

    def getTripCarImage(self):
        return self.operater.find_element(self.tripCarImage, "tripCarImage")
示例#13
0
class CarFilterPage(Element_Operation):
    appConfig = GoFunConfiguration.GoFunConfiguration()
    carFilter = appConfig.get("HOME.FILTER")
    brand_list = appConfig.get_list("BRAND.LIST")
    seat_list = appConfig.get_list("SEAT.LIST")
    power_list = appConfig.get_list("POWER.TYPE")
    mileScroll = appConfig.get("MILE.SCROLL")
    filterConfirm = appConfig.get("FILTER.CAR.CONFIRM")
    filterReset = appConfig.get("FILTER.RESET")
    operater = Element_Operation()
    
    def __init__(self):
        pass     
        
    #主页-车辆筛选
    def carFilter_exist(self):
        return self.operater.exist(self.carFilter, "homepage car filter")
        
    def carFilter_click(self):
        self.operater.find_click_element(self.carFilter, des="homepage car filter")
        
    #主页-车辆筛选-车型
    def getBrandList(self):
        return self.brand_list

    def brand_exist(self, brand):
        return self.operater.exist(brand, "%s"%brand)
        
    def brand_click(self, brand):
        self.operater.find_click_element(brand, des="%s"%brand)
        
    #主页-车辆筛选-座位数
    def getSeatList(self):
        return self.seat_list

    def seat_exist(self, seat):
        return self.operater.exist(seat, "%s"%seat)
        
    def seat_click(self, seat):
        self.operater.find_click_element(seat, des="%s"%seat)
        
    #主页-车辆筛选-动力类型
    def getPowerList(self):
        return self.power_list

    def power_exist(self, power):
        return self.operater.exist(power, "%s"%power)
        
    def power_click(self, power):
        self.operater.find_click_element(power, des="%s"%power)
 
    #主页-车辆筛选-滑轮
    def mileScroll_exist(self):
        return self.operater.exist(self.mileScroll, "存在【滑轮】")
        
    def mileScroll_find(self):
        return self.operater.find_element(self.mileScroll)

    #主页-车辆筛选-确认按钮
    def confirm_exist(self):
        return self.operater.exist(self.filterConfirm, "confirm")
        
    def confirm_click(self):
        self.operater.find_click_element(self.filterConfirm, des="confirm")
        
    #主页-车辆筛选-重置按钮
    def reset_exist(self):
        return self.operater.exist(self.filterReset, "reset icon")
        
    def reset_click(self):
        self.operater.find_click_element(self.filterReset, des="reset icon")