def __init__(self): import re """ 检测是否已登录云钱包为""" Pointer.me_page() if Pointer.devices(text="请登录").exists: from scr.common.app.me import CloudWallet cloud = CloudWallet() cloud.login() Pointer.tokencat_page() # 获取云账户ICT cloud_account_total = Pointer.devices( resourceId="com.x.wallet.debug:id/tv_total").get_text() self.cloud_account_total = int( re.findall(r"\d+", cloud_account_total)[0]) Pointer.wallet_page() # 获取云钱包ICT self.cloud_wallet_total = Pointer.devices( resourceId="com.x.wallet.debug:id/balance_tv").get_text() Pointer.tokencat_page()
def __init__(self): if Pointer.devices(text="请登录").exists: Pointer.devices(text="云端钱包").click() # 进入 CloudWallet.login() # 如果没有登录,将进行登录 Pointer.wallet_page() # 登录完成后跳转到Wallet_page