def get_currrncy_data(self): try: __MZCdata = ElementsIde().elementXpath(HomeData().mzc_curData).text __MZCprice = ElementsIde().elementXpath(HomeData().mzc_price).text return __MZCdata + __MZCprice except Exception: return "获取跌币最新价格失败!"
def get_AppreCurrency_data(self): try: __LSKDtat = ElementsIde().elementXpath( HomeData().currency_data).text __LSKprice = ElementsIde().elementXpath(HomeData().price_new).text return __LSKDtat + __LSKprice except Exception: return "获取涨币最新价格失败!"
def get_trade_BTCCurrency(self): try: __currencyNew = ElementsIde().elementXpath( HomeData().trade_BTC_name).tex __curNewNum = ElementsIde().elementXpath( HomeData.trade_BTC_value).text return __currencyNew + __curNewNum except Exception: return "获取场外交易BTC最新价失败!"
def click_BTCtap_To_Trade(self): try: ElementsIde().elementXpath(HomeData().btcTrade_button).click() __expect_value = "My Order" ___act_value = ElementsIde().elementXpath( HomeData().act_Trade_Page) if __expect_value == ___act_value: return "页面跳转到场外交易成功!" except Exception: return "页面跳转到场外交易页面失败!"
def slideshow(self): ElementsIde().elementXpath(HomeData().slideshow_1).click() try: ElementsIde().elementXpath(HomeData().slideshow_1).click() except Exception: print "没有找到轮播图1!" try: ElementsIde().elementXpath(HomeData().slideshow_2).click() except Exception: print "没有找到轮播图2!"
def ErrorValue(self): try: __ErrorValue = ElementsIde().elementXpath( ".//*[@id='login_fm']/div/div[5]/p").text if __ErrorValue == "Please enter email" or "Account does not exist": ElementsIde().elementXpath(".//*[@id='lg_myem']").click() SignIN().Email() if __ErrorValue == "Please enter password" or "Incorrect password ! You left 4 chances !": #错误字符串错误处理 ElementsIde().elementXpath(".//*[@id='lg_mypsw']").click() SignIN().PassWd() except Exception: return "登录信息无误!"
def PassWd(self): __PassWd = "" try: ElementsIde().elementXpath(".//*[@id='lg_mypsw']").send_keys( __PassWd) except Exception: return "输入密码错误!!!"
def chg(self): try: __chg = ElementsIde().elementXpath( ".//*[@id='trendsCon']/div/div[5]").text return __chg except Exception: return "获取币种涨跌幅失败!"
def LowPrice(self): try: __lowPrice = ElementsIde().elementXpath( ".//*[@id='trendsCon']/div/div[4]").text return __lowPrice except Exception: return "获取最低价失败!"
def HighPrice(self): try: __highprice = ElementsIde().elementXpath( ".//*[@id='trendsCon']/div/div[3]").text return __highprice except Exception: return "获取最高价失败!"
def fl(self): try: __currencyDynamic = ElementsIde().elementXpath( ".//*[@id='trendsCon']/div/div[1]").text return __currencyDynamic except Exception: return ("获取'币种'最新交易动态失败!")
def tradeNum(self): try: __tradeNum = ElementsIde().elementXpath( ".//*[@id='trendsCon']/div/div[6]").text return __tradeNum except Exception: return "获取24小时成交量失败!"
def Email(self): __Email = "" try: ElementsIde().elementXpath(".//*[@id='lg_myem']").send_keys( __Email) except Exception: return "输入邮箱错误!!!"
def title(self): #...最新交易动态 try: __trade_name_element = ElementsIde().elementXpath( BTC_Data().trade_name_element) print __trade_name_element except Exception: print "获取比特币(BTC)最新交易动态失败!" #最新价 try: __newPrice = ElementsIde().elementXpath(BTC_Data().newPrice) print __newPrice except Exception: print #最高价 __highPrice = ElementsIde().elementXpath(BTC_Data().highPrice) print __highPrice
def Sumbit(self): try: ElementsIde().elementID("reg_btn").click() except Exception: return "点击注册按钮失败!"
def Ver_Code(self): vercode = "" try: ElementsIde().elementID("captcha").send_keys(vercode) except Exception: return "输入图形验证码失败!"
def Terms(self): try: ElementsIde().elementID("reg_agck").click() except Exception: return "勾选用户协议失败!"
def Invite(self): uid = "" try: ElementsIde().elementID("pid").send_keys(uid) except Exception: return "添加邀请人失败!"
def Repeat_Password(self): rpaw = "qwerqwer" try: ElementsIde().elementID("repwd").send_keys(rpaw) except ElementsIde: return "输入确认密码失败!"
def Email(self): email = "" try: ElementsIde().elementID("lg_myem").send_keys() except Exception: return "登录输入用户名失败!"
def Submit(self): try: ElementsIde().elementID("forgot_btn").click() except Exception: return "点击确定按钮失败!"
def ForgotPwd(self): try: ElementsIde().elementID("lg_forgot").click() except Exception: return "点击忘记密码失败!"
def SignInButton(self): try: ElementsIde().elementID("lg_btn").click() except Exception: return "点击登录按钮失败!"
def saleList(self): try: __salelist = ElementsIde().elementID("salelist").text return __salelist except Exception: return "获取卖单列表失败!"
def SignUp(self): try: ElementsIde().elementID("lg_creat").click() except Exception: return "点击注册失败!"
def Eamil(self): __email = publicModle().RandomEmail() try: ElementsIde().elementID("email").send_keys(__email) except Exception: return "输入邮箱失败!"
def ImageCode(self): code = "" try: ElementsIde().elementID("forgot_code").send_keys(code) except Exception: return "输入图形验证码失败!"
def Password(self): paw = "qwerqwer" try: ElementsIde().elementID("pwd").send_keys(paw) except Exception: return "输入密码失败!"
def Email(self): email = "" try: ElementsIde().elementID("forgot_myem").send_keys(email) except Exception: return "输入邮箱失败!"
def Password(self): pwd = "qwerqweqr" try: ElementsIde().elementID("lg_mypsw").send_keys() except Exception: return "登录输入密码失败!"