如何使用selenium Java在popover窗口中提取文本
我对硒还不熟悉。我需要找到一种方法,如何使用selenium/java从弹出窗口中获取文本,以便将文本与预期数据进行比较
我可以从弹出窗口中提取文本吗。当我在WebElementACE上鼠标悬停时,会出现一个弹出窗口,我必须从中提取数据。附有html代码的截图
提前谢谢
我试着跟着,但没有成功
WebElement lMail=驱动程序。findElement(By.xpath(//span[text()='ACE'][@class='footer-title twc blue twc roundbook'])
new Actions(driver).moveToElement(lMail).perform();
Actions act = new Actions(driver);
WebElement age_purpose = driver.findElement(By.xpath("//div[contains(@class, 'popover ng-scope ng-isolate-scope top fade in')]/div/div[@class='popover-inner']"));
act.moveToElement(age_purpose).perform();
String tooltiptextreal = age_purpose.getAttribute("innerHTML");[enter image description [enter image description here][1]
共 (0) 个答案