【发布时间】:2019-02-24 17:24:46
【问题描述】:
我正在尝试编写代码以自动在 Instagram 上向人们发送 DM。我坚持让代码点击 DM 按钮。
在 UIautomatorviewer 中,没有文本或资源 ID,所以我尝试使用该类。
当我运行代码时,它没有点击正确的东西。它点击按钮 NEXT 到它。
这里是代码 -
By path2 = By.xpath("//android.widget.ImageView[@index='3']");
driver.findElement(path2).click();
Thread.sleep(5000);
有人可以帮忙吗?我是新手,所以我不是很有经验。
【问题讨论】:
标签: java android selenium automation appium