需要帮助线程“main” org.openqa.selenium

我的任务是取消选中复选框,并再次检查的复选框。


这是网站(在代码中提到要遍历的所有selenium脚本)。


我作为初学者正在研究selenium web 驱动程序,好吧,我在运行 selenium 测试脚本时卡在了一个地方,我想取消选中底部的复选框,该复选框表示同意管理 Naukri 使用的条款和条件.com


我已经查看了默认的邮件程序和通信设置。


帮助将不胜感激。


错误堆栈跟踪是:


Exception in thread "main" org.openqa.selenium.WebDriverException:  

  Element is not clickable at the point. Other element would receive the

  click: <label for="term" class="customChkBoxLbl chkboxLbl"></label>

到目前为止我尝试过的代码:


WebDriver driver13=new FirefoxDriver();

driver13.manage().timeouts().implicitlyWait(6, TimeUnit.SECONDS);

driver13.get("https://www.naukri.com/");

driver13.manage().window().maximize();

driver13.findElement(By.xpath("//*[@id=\"p0widget\"]/div[1]/div[1]/div[1]/input[1]")).click();

driver13.findElement(By.xpath("//button[@value='exp']")).click();

我也试过这个,但得到的例外是:


尽管我编写了正确的 XPath,但下面的代码不起作用:


Actions a = new Actions(driver13);

a.moveToElement(driver13.findElement(By.xpath("//input[@name='term']"))).click().build().perform();

至尊宝的传说
浏览 107回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java