【发布时间】:2017-03-14 16:50:10
【问题描述】:
我正在为 android 编写自动化测试并尝试单击滑出按钮打开导航。
我正在使用 Appium 和 SpecFlow 功能。
我试图做的是:
[Given(@"I press hamburger button")]
public void GivenIPressHumburgerButton()
{
ReadOnlyCollection<AppiumWebElement> appiumWebElements = _driverInit.GetDriver().FindElements(By.ClassName("android.widget.ImageButton"));
appiumWebElements[0].Click();
}
问题:这个测试有时会失败,有时会通过。
问题:有没有更好的方法在自动化测试中找到汉堡按钮并单击它以使其始终通过?
【问题讨论】:
标签: c# android automation appium specflow