我无法检查下拉列表是否包含标题“职位”

问题描述 投票:0回答:0

我在 java 中使用 selenium 测试这个网站 https://opensource-demo.orangehrmlive.com/ 我陷入了测试的这一部分,我必须检查下拉列表是否包含标题“职位”

> Actions action1 = new Actions(driver);
>       action1.moveToElement(driver.findElement(By.xpath("//*[@id=\"app\"]/div[1]/div[1]/header/div[2]/nav/ul/li[2]"))).build().perform();

使用上面的代码,它悬停在“工作”上但没有点击它,我尝试使用链接文本,部分文本,选择但每次显示“找不到元素”甚至尝试使用等待

帮助! :) 连chatgpt都解决不了

selenium-webdriver testing selenium-ide web-testing selenium-java
© www.soinside.com 2019 - 2024. All rights reserved.