久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <i id='E7rW1'><tr id='E7rW1'><dt id='E7rW1'><q id='E7rW1'><span id='E7rW1'><b id='E7rW1'><form id='E7rW1'><ins id='E7rW1'></ins><ul id='E7rW1'></ul><sub id='E7rW1'></sub></form><legend id='E7rW1'></legend><bdo id='E7rW1'><pre id='E7rW1'><center id='E7rW1'></center></pre></bdo></b><th id='E7rW1'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='E7rW1'><tfoot id='E7rW1'></tfoot><dl id='E7rW1'><fieldset id='E7rW1'></fieldset></dl></div>
    <tfoot id='E7rW1'></tfoot>
    • <bdo id='E7rW1'></bdo><ul id='E7rW1'></ul>
      <legend id='E7rW1'><style id='E7rW1'><dir id='E7rW1'><q id='E7rW1'></q></dir></style></legend>

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

    1. 如何正確設置 Java/Selenium 配置以運行自動化測試

      How to properly set up Java/Selenium configuration to run automated tests?(如何正確設置 Java/Selenium 配置以運行自動化測試?)
      <i id='KuBbs'><tr id='KuBbs'><dt id='KuBbs'><q id='KuBbs'><span id='KuBbs'><b id='KuBbs'><form id='KuBbs'><ins id='KuBbs'></ins><ul id='KuBbs'></ul><sub id='KuBbs'></sub></form><legend id='KuBbs'></legend><bdo id='KuBbs'><pre id='KuBbs'><center id='KuBbs'></center></pre></bdo></b><th id='KuBbs'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='KuBbs'><tfoot id='KuBbs'></tfoot><dl id='KuBbs'><fieldset id='KuBbs'></fieldset></dl></div>
      <tfoot id='KuBbs'></tfoot>
      <legend id='KuBbs'><style id='KuBbs'><dir id='KuBbs'><q id='KuBbs'></q></dir></style></legend>

              • <bdo id='KuBbs'></bdo><ul id='KuBbs'></ul>

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

                  <tbody id='KuBbs'></tbody>
              • 本文介紹了如何正確設置 Java/Selenium 配置以運行自動化測試?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我正在嘗試設置 selenium webdriver 以與帶有 Java 的 Browserstack 一起使用以進行自動化測試.我為 Java 安裝了 Selenium,并從 browserstack 的站點 https://www 復制并粘貼了代碼.browserstack.com/automate/java#configure-capabilities 設置一個示例自動化測試.

                I am trying to set up selenium webdriver to work together with Browserstack with Java for automated testing. I installed the Selenium for java and I copied and pasted the code from browserstack's site https://www.browserstack.com/automate/java#configure-capabilities to set up an example automation test.

                我從終端運行了 javac -classpath selenium-server-standalone-2.48.2.jar JavaSample.java(JavaSample.java 是帶有示例測試的 selenium 配置代碼的文件)和我收到以下錯誤:

                I ran javac -classpath selenium-server-standalone-2.48.2.jar JavaSample.java from my terminal (JavaSample.java is the file with the selenium configuration code with the sample test) and I get the following error:

                JavaSample.java:1: error: package org.openqa.selenium does not exist
                import org.openqa.selenium.By;
                                      ^
                JavaSample.java:2: error: package org.openqa.selenium does not exist
                import org.openqa.selenium.Platform;
                                      ^
                JavaSample.java:3: error: package org.openqa.selenium does not exist
                import org.openqa.selenium.WebDriver;
                                      ^
                JavaSample.java:4: error: package org.openqa.selenium does not exist
                import org.openqa.selenium.WebElement;
                                      ^
                JavaSample.java:5: error: package org.openqa.selenium.remote does not exist
                import org.openqa.selenium.remote.DesiredCapabilities;
                                             ^
                JavaSample.java:6: error: package org.openqa.selenium.remote does not exist
                import org.openqa.selenium.remote.RemoteWebDriver;
                                             ^
                JavaSample.java:18: error: cannot find symbol
                DesiredCapabilities caps = new DesiredCapabilities();
                ^
                symbol:   class DesiredCapabilities
                location: class JavaSample
                JavaSample.java:18: error: cannot find symbol
                DesiredCapabilities caps = new DesiredCapabilities();
                                               ^
                symbol:   class DesiredCapabilities
                location: class JavaSample
                JavaSample.java:25: error: cannot find symbol
                WebDriver driver = new RemoteWebDriver(new URL(URL), caps);
                ^
                symbol:   class WebDriver
                location: class JavaSample
                JavaSample.java:25: error: cannot find symbol
                WebDriver driver = new RemoteWebDriver(new URL(URL), caps);
                                       ^
                symbol:   class RemoteWebDriver
                location: class JavaSample
                JavaSample.java:27: error: cannot find symbol
                WebElement element = driver.findElement(By.name("q"));
                ^
                symbol:   class WebElement
                location: class JavaSample
                JavaSample.java:27: error: cannot find symbol
                WebElement element = driver.findElement(By.name("q"));
                                                        ^
                symbol:   variable By
                location: class JavaSample
                

                我不知道該怎么做,因為我只是按照 Browserstack 上的說明進行操作,而且我對 Java 的背景很少.

                I'm not sure how to go about this being as I just followed the instructions on Browserstack and I have very little background in Java.

                推薦答案

                您必須從 Selenium 下載.您可以點擊此處.

                You will have to download the "Selenium Client & WebDriver Language Bindings" for Java from Selenium Downloads. You can download directly by clicking the link here.

                包括下載的 ZIP 文件中存在的所有 JAR 文件.要在 Java 類路徑中包含多個 JAR,您可以查看此處的鏈接.

                Include all the JAR files that are present in the downloaded ZIP file. To include multiple JARs in Java classpath, you can check the link here.

                如果您在本地運行測試,則需要 selenium-server-standalone JAR.執行命令 java -jar selenium-server-standalone-2.48.2.jar 將啟動一個 Selenium 服務器,它需要在本地啟動 Selenium 測試.如果您在 BrowserStack 上運行測試,則不需要使用它.

                The selenium-server-standalone JAR is required if you are running your tests locally. Executing the command java -jar selenium-server-standalone-2.48.2.jar will start a Selenium server, which required to launch Selenium tests locally. You need not use it, if you are running tests on BrowserStack.

                還建議使用適用于 Java 的 IDE.最普遍推薦的是 IntelliJ Idea、Eclipse 和 Netbeans.

                Would also recommend using an IDE for Java. The most commonly recommended ones are IntelliJ Idea, Eclipse, and Netbeans.

                這篇關于如何正確設置 Java/Selenium 配置以運行自動化測試?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                How to convert Integer to int?(如何將整數轉換為整數?)
                How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                Inconsistent behavior on java#39;s ==(java的行為不一致==)
                Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)
                • <i id='IPeVt'><tr id='IPeVt'><dt id='IPeVt'><q id='IPeVt'><span id='IPeVt'><b id='IPeVt'><form id='IPeVt'><ins id='IPeVt'></ins><ul id='IPeVt'></ul><sub id='IPeVt'></sub></form><legend id='IPeVt'></legend><bdo id='IPeVt'><pre id='IPeVt'><center id='IPeVt'></center></pre></bdo></b><th id='IPeVt'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='IPeVt'><tfoot id='IPeVt'></tfoot><dl id='IPeVt'><fieldset id='IPeVt'></fieldset></dl></div>

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

                        <tbody id='IPeVt'></tbody>
                        <bdo id='IPeVt'></bdo><ul id='IPeVt'></ul>

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

                          主站蜘蛛池模板: 中文字幕人成乱码在线观看 | 国产精品呻吟久久av凹凸 | aaa大片免费观看 | 欧美三区视频 | 欧美日韩亚洲国产综合 | 91影院在线观看 | 日本成人中文字幕在线观看 | 亚洲成人免费视频在线观看 | 欧美成人一区二区 | 亚洲狠狠| 久久久91 | 久久99精品久久久久久 | 黄免费观看| 久久久高清| 国产精品黄 | 91久久久久久久久久久久久 | 欧美一区二区三区在线视频 | 亚洲精品一区二区三区丝袜 | 午夜二区 | 精品视频在线一区 | 国产欧美在线观看 | 日本精品免费在线观看 | 国产在线观看不卡一区二区三区 | 在线观看日本高清二区 | 久久婷婷香蕉热狠狠综合 | 91天堂网 | 亚洲一区国产精品 | 福利视频一二区 | 一级一级毛片免费看 | 视频在线一区二区 | 欧美无乱码久久久免费午夜一区 | www.国产精| 中文字幕在线视频免费视频 | 欧美a v在线 | 亚洲精品视频久久 | 午夜影院在线观看免费 | 最新中文字幕 | 亚洲精品乱码久久久久久久久久 | 国产精品96久久久久久 | www.黄色片视频 | 久久亚 |