Javascript SeleniumWebDriver&;Java:捕获图像并在结果页面中显示
截图一拍下来,您会如何在JSP页面中(可能是通过iframe)显示通过webdriver拍摄的截图 ---类似于BrowserStack显示屏幕截图的新功能 寻找逻辑 仅供参考:现在截图以随机名称存储在不同的文件夹中。所以,我无法遍历文件夹并在jsp页面中显示它们Javascript SeleniumWebDriver&;Java:捕获图像并在结果页面中显示,javascript,java,selenium,iframe,selenium-webdriver,Javascript,Java,Selenium,Iframe,Selenium Webdriver,截图一拍下来,您会如何在JSP页面中(可能是通过iframe)显示通过webdriver拍摄的截图 ---类似于BrowserStack显示屏幕截图的新功能 寻找逻辑 仅供参考:现在截图以随机名称存储在不同的文件夹中。所以,我无法遍历文件夹并在jsp页面中显示它们 public void runWebdriverScript(){ //run scripts //calls takescreenshot(elementInfo, driver) } public void ta
public void runWebdriverScript(){
//run scripts
//calls takescreenshot(elementInfo, driver)
}
public void takescreenshot(elementInfo, driver){
//if elementInfo.equals to yes take screen shot
// Once screenshot taken it should be displayed in a jsp page
}
在JSP页面中:
//automatically create following
//using bootstrap
<div class="item">
<img src="{ add filePath }" alt="...">
<div class="carousel-caption">
<h3>Caption Text</h3>
</div>
</div>
//自动创建以下内容
//使用引导
标题文本