Can we find element by ID in appium

前端 未结 6 726
野的像风
野的像风 2020-12-09 04:13

following link mentions that we can find element by giving id... but i am unable to find it.

https://github.com/appium/appium/blob/master/docs/en/writing-running-app

6条回答
  •  忘掉有多难
    2020-12-09 04:37

    You can use element ID as following:-

    package name : com.example.testap

    Element ID : txtLogin

    write the following code -

     driver.findElement(By.id("com.example.testapp:id/txtLogin")).sendKeys("abc");
    

提交回复
热议问题