仅显示可见光图像现在我的应用程序只显示12在前端的图像,但同时通过的XPath获取它显示18张图像。如何通过硒脚本
使用的X路径为:
driver.findElemnt(By.xpath("xpath")).size();
使用的代码:
int showCount = driver.findElements(By.xpath(ObjRepoProp.getProperty("homePageShowLogoImage_XPATH"))).size();
for (int i = 1; i <= showCount; i++) {
driver.findElement(By.xpath(ObjRepoProp.getProperty("homePageShowLogoImage_XPATH"))).isDisplayed();
i=i+1;
log.info(i + "shows are present in GET TO KNOW THE SHOW section (Count of only shows which are displaying on screen).\n");
}
我需要显示仅12张图像。
添加实际XPath和页面的源代码,以您的问题... – Grasshopper