<i id='zsMDp'><tr id='zsMDp'><dt id='zsMDp'><q id='zsMDp'><span id='zsMDp'><b id='zsMDp'><form id='zsMDp'><ins id='zsMDp'></ins><ul id='zsMDp'></ul><sub id='zsMDp'></sub></form><legend id='zsMDp'></legend><bdo id='zsMDp'><pre id='zsMDp'><center id='zsMDp'></center></pre></bdo></b><th id='zsMDp'></th></span></q></dt></tr></i><div id='zsMDp'><tfoot id='zsMDp'></tfoot><dl id='zsMDp'><fieldset id='zsMDp'></fieldset></dl></div>

        <small id='zsMDp'></small><noframes id='zsMDp'>

        • <bdo id='zsMDp'></bdo><ul id='zsMDp'></ul>
        <legend id='zsMDp'><style id='zsMDp'><dir id='zsMDp'><q id='zsMDp'></q></dir></style></legend>

      1. <tfoot id='zsMDp'></tfoot>

        如何从 RemoteWebDriver 服务器而不是本地 FirefoxDriver 获取屏幕截图?

        How to get screenshot from RemoteWebDriver server instead of local FirefoxDriver?(如何从 RemoteWebDriver 服务器而不是本地 FirefoxDriver 获取屏幕截图?)
        <legend id='CNcRz'><style id='CNcRz'><dir id='CNcRz'><q id='CNcRz'></q></dir></style></legend>

            <tbody id='CNcRz'></tbody>

          1. <i id='CNcRz'><tr id='CNcRz'><dt id='CNcRz'><q id='CNcRz'><span id='CNcRz'><b id='CNcRz'><form id='CNcRz'><ins id='CNcRz'></ins><ul id='CNcRz'></ul><sub id='CNcRz'></sub></form><legend id='CNcRz'></legend><bdo id='CNcRz'><pre id='CNcRz'><center id='CNcRz'></center></pre></bdo></b><th id='CNcRz'></th></span></q></dt></tr></i><div id='CNcRz'><tfoot id='CNcRz'></tfoot><dl id='CNcRz'><fieldset id='CNcRz'></fieldset></dl></div>
              <tfoot id='CNcRz'></tfoot>

                <small id='CNcRz'></small><noframes id='CNcRz'>

                  <bdo id='CNcRz'></bdo><ul id='CNcRz'></ul>

                  本文介绍了如何从 RemoteWebDriver 服务器而不是本地 FirefoxDriver 获取屏幕截图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 RemoteWebDriver 从我的笔记本电脑(java 客户端)在远程 PC 上运行 Selenium WebDriver 测试.但是 RemoteWebDriver 没有提供截图 API 来直接获取远程 PC 的截图.谷歌搜索了很多,但发现似乎需要使用 Json API 直接从 remoteWebDriver 服务器获取它.任何人都可以给我一些关于如何做到这一点的指导吗?谢谢.

                  I am running Selenium WebDriver test on a remote PC from my laptop(java client), by using RemoteWebDriver. But RemoteWebDriver haven't provided screenshot API to directly get a screenshot of remote PC. Googled a lot but found seems need use to Json API to get it from remoteWebDriver server directly. Anyone can give me some instruction about how to do that? Thanks.

                  推荐答案

                  必须先扩充 RemoteWebDriver,然后才能使用屏幕截图功能.毫无疑问,您已经发现,尝试在不增加的情况下进行投射会导致异常.

                  The RemoteWebDriver must be augmented before you can use the screenshot capability. As you have no doubt already found, attempting to cast without augmenting results in an exception.

                  WebDriver driver = new RemoteWebDriver( ... );
                  driver           = new Augmenter().augment( driver );
                  ( (TakesScreenshot)driver ).getScreenshotAs( ... );
                  

                  这篇关于如何从 RemoteWebDriver 服务器而不是本地 FirefoxDriver 获取屏幕截图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Maven JAVA_HOME environment variable is not defined correctly, but it is(Maven JAVA_HOME 环境变量未正确定义,但它是)
                  Java System Environment Variable(Java 系统环境变量)
                  Java -classpath option(Java -classpath 选项)
                  Read environment variable in SpringBoot(在 SpringBoot 中读取环境变量)
                  Tomcat 8 - context.xml use Environment Variable in Datasource(Tomcat 8 - context.xml 在数据源中使用环境变量)
                  Issue with JAVA_HOME(JAVA_HOME 的问题)

                    <tbody id='FYuNi'></tbody>
                  <tfoot id='FYuNi'></tfoot>
                • <legend id='FYuNi'><style id='FYuNi'><dir id='FYuNi'><q id='FYuNi'></q></dir></style></legend>

                            <bdo id='FYuNi'></bdo><ul id='FYuNi'></ul>

                            <small id='FYuNi'></small><noframes id='FYuNi'>

                            <i id='FYuNi'><tr id='FYuNi'><dt id='FYuNi'><q id='FYuNi'><span id='FYuNi'><b id='FYuNi'><form id='FYuNi'><ins id='FYuNi'></ins><ul id='FYuNi'></ul><sub id='FYuNi'></sub></form><legend id='FYuNi'></legend><bdo id='FYuNi'><pre id='FYuNi'><center id='FYuNi'></center></pre></bdo></b><th id='FYuNi'></th></span></q></dt></tr></i><div id='FYuNi'><tfoot id='FYuNi'></tfoot><dl id='FYuNi'><fieldset id='FYuNi'></fieldset></dl></div>