Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/441.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/386.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript SeleniumWebDriver&;Java:捕获图像并在结果页面中显示_Javascript_Java_Selenium_Iframe_Selenium Webdriver - Fatal编程技术网

Javascript SeleniumWebDriver&;Java:捕获图像并在结果页面中显示

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

截图一拍下来,您会如何在JSP页面中(可能是通过iframe)显示通过webdriver拍摄的截图

---类似于BrowserStack显示屏幕截图的新功能

寻找逻辑

仅供参考:现在截图以随机名称存储在不同的文件夹中。所以,我无法遍历文件夹并在jsp页面中显示它们

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>
//自动创建以下内容
//使用引导
标题文本