simple test code


function Login_Mobile(){
target.frontMostApp().tabBar().buttons()["我的淘宝"].tap();
if(target.frontMostApp().navigationBar().rightButton().name()=="登录"){
target.frontMostApp().mainWindow().tableViews()["空列表"].cells()[0].tapWithOptions({tapOffset:{x:0.92, y:0.57}});//清空登录时,帐号的输入框
target.frontMostApp().keyboard().typeString("13600527882");
target.frontMostApp().mainWindow().tableViews()["空列表"].cells()["密 码:"].tap();

target.frontMostApp().keyboard().typeString("test1234");
target.frontMostApp().navigationBar().buttons()["登录"].tap();
}
else{
target.frontMostApp().navigationBar().buttons()["bar button refresh"].tap();
target.frontMostApp().navigationBar().buttons()["bar button refresh"].tap();
target.frontMostApp().mainWindow().tableViews()["空列表"].buttons()["mytaobao setting"].tap();
target.frontMostApp().mainWindow().tableViews()[0].cells()["注销当前帐号"].tap();
target.frontMostApp().actionSheet().buttons()["确定"].tap();




/*
target.frontMostApp().tabBar().buttons()["我的淘宝"].tap();
target.frontMostApp().mainWindow().tableViews()["空列表"].buttons()["mytaobao setting"].tap();
target.frontMostApp().mainWindow().buttons()[0].tap();
target.frontMostApp().mainWindow().tableViews()["空列表"].buttons()["mytaobao setting"].tap();
target.frontMostApp().mainWindow().tableViews()[0].cells()["注销当前帐号"].tap();
target.tap({x:492.00, y:377.00});
target.tap({x:477.00, y:401.00});
target.tap({x:506.00, y:391.00});
target.tap({x:516.00, y:393.00});
target.tap({x:515.00, y:394.00});
target.frontMostApp().actionSheet().buttons()["取消"].tap();

target.frontMostApp().navigationBar().buttons()["退出登录"].tap();
target.frontMostApp().actionSheet().buttons()["确定"].tap();
target.frontMostApp().mainWindow().tableViews()["空列表"].cells()[0].tapWithOptions({tapOffset:{x:0.92, y:0.57}});//清空登录时,帐号的输入框
target.frontMostApp().keyboard().typeString("13600527882");
target.frontMostApp().mainWindow().tableViews()["空列表"].cells()["密 码:"].secureTextFields()[0].tap();
target.frontMostApp().keyboard().typeString("test1234");
target.frontMostApp().navigationBar().buttons()["登录"].tap();
*/
}
target.frontMostApp().tabBar().buttons()["首页"].tap();
}

var target = UIATarget.localTarget();
Login_Mobile();
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值