使用appium自动执行登录过程时,密码和用户名会输入到用户名的同一字段中 [英] While automating login process with appium the password and username are entred in the same field of username

查看:502
本文介绍了使用appium自动执行登录过程时,密码和用户名会输入到用户名的同一字段中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管测试清晰明了,但在尝试发送密钥(用户名;密码)时,我始终会遇到相同的问题,但密码字段是用username代替的!

Although the test is clear and simple i'm always facing the same problem while tring to send keys (username; password) the password field is written in place of username !

这里是我的Test NG,我正在使用appium进行测试

Here my Test NG i'm using appium for my tests

@Test
    public void Test1() throws InterruptedException {
        System.out.println("newlook-tutoriel");
        driver.findElement(By.id("skip")).click();
        System.out.println("newlook-welcome");
        driver.findElement(By.id("btn_signin_welcome")).click();
        System.out.println("newlook-Me connecter");
        driver.findElement(By.id("input_email")).sendKeys("e@e.emma.com");
        driver.findElement(By.id("input_password")).sendKeys("00000000");
        System.out.println("connected !!!!");
    }

我有用户名= e@e.emma.com00000000

i got username = e@e.emma.com00000000

推荐答案

最后,我已通过添加到我的代码中来解决此问题:

Finally i have resolved this issue by adding to my code :

driver.hideKeyboard();

问题是因为键盘隐藏了密码字段!

The issue was because the keyboard is hiding the field of password !

这篇关于使用appium自动执行登录过程时,密码和用户名会输入到用户名的同一字段中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆