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

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

问题描述

虽然测试清晰而简单,但我在尝试发送密钥(用户名;密码)时总是面临同样的问题,密码字段被写入代替用户名!

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

@Testpublic void Test1() 抛出 InterruptedException {System.out.println("newlook-tutorialel");driver.findElement(By.id("skip")).click();System.out.println("newlook-欢迎");driver.findElement(By.id("btn_signin_welcome")).click();System.out.println("newlook-Me 连接器");driver.findElement(By.id("input_email")).sendKeys("e@e.emma.com");driver.findElement(By.id("input_password")).sendKeys("00000000");System.out.println("连接!!!!");}

<块引用>

我得到了用户名 = e@e.emma.com00000000

解决方案

最后我通过添加到我的代码中解决了这个问题:

driver.hideKeyboard();

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

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 !

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 !!!!");
    }

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天全站免登陆