如何解决Coachmark并未在Apium的Android应用中关闭
当我在Apium中运行我的应用程序时,我能够成功登录。登录后,有一个标记可以帮助初次使用的用户。我无法使用Apium方法解散该coachmak。我尝试了如下多种方法-
(1)Thread.sleep(5000);
(2)WebDriverWait等待=新的WebDriverWait(driver,15,3000); wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(xPath)));
(3)findElementByXPath和findElementById都
我得到的错误是: org.openqa.selenium.NoSuchElementException:使用给定的搜索参数无法在页面上找到元素。 有关此错误的文档,请访问:https://www.seleniumhq.org/exceptions/no_such_element.html
这是我的方法的样子:
void logInBeforeOtherTestcases() throws Exception {
// LogIn login = new LogIn();
if (readFile(ExcelFilePath,ExcelTestSuite,ExcelTestSuiteSheetName,"GenerateSmartPractice") &&
readFile(ExcelFilePath,ExcelTestCase,ExcelTestCaseSheetName,"smartPractice")) {
logIn();
smartPractice();
if (readFile(ExcelFilePath,"smartPracticeReportedQuestion")) {
smartPracticeReportedQuestion();
}
} else {
logger.info("Login not excecuted check excel file configuration");
}
}
void smartPractice() throws Exception {
logger.info("Smart Practice Start");
Thread.sleep(mili5000);
String name = findByXpath("/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/androidx.viewpager.widget.ViewPager/android.view.ViewGroup/android.view.ViewGroup/android.widget.LinearLayout[1]/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.LinearLayout[1]/android.widget.TextView[1]").getText();
logger.info("name is :- "+name);
findById("com.abcd.test:id/linRewardCount").click();
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。