Selenium provides its API implementation in multiple programming languages. However, Selenium API Java-based bindings are the most popular. In this tutorial, we will learn how to download Selenium JARs and configure Eclipse IDE to use them in writing test scripts.
Selenium以多种编程语言提供其API实现。 但是,基于Java的Selenium API绑定是最流行的。 在本教程中,我们将学习如何下载Selenium JAR,并配置Eclipse IDE以在编写测试脚本时使用它们。
To configure Eclipse with Selenium WebDriver, we need to perform the following activities:
要使用Selenium WebDriver配置Eclipse ,我们需要执行以下活动:
- Installing Java 安装Java
- Installing Eclipse IDE 安装Eclipse IDE
- Configure Eclipse IDE with WebDriver 使用WebDriver配置Eclipse IDE
安装Java (Installing Java)
- Step 1: Go to the official website (https://www.oracle.com/technetwork/java/javase/downloads) and click on the Download tab. 步骤1 :转到官方网站(https://www.oracle.com/technetwork/java/javase/downloads),然后单击“下载”选项卡。
-
- Step 2: Click Icon under Java SE Downloads 步骤2 :在Java SE Downloads下单击Icon
-
- Step 3: Accept the License Agreement and choose the JDK that corresponds to your Operating System. 步骤3 :接受许可协议,然后选择与您的操作系统相对应的JDK。
-
- Step 4: Once the download is complete, run the executable file to install JDK in Windows. Perform similar steps for Mac DMG file. For Linux, you just need to untar and set PATH variable to execute java commands. 步骤4 :下载完成后,运行可执行文件以在Windows中安装JDK。 对Mac DMG文件执行类似的步骤。 对于Linux,您只需解压缩并设置PATH变量即可执行Java命令。
-
安装Eclipse IDE (Installing Eclipse IDE)
Let’s see how to install Eclipse IDE for Windows. The steps are almost similar for Mac and Linux operating systems too. You have to follow similar steps with the Eclipse installer files of the corresponding operating system.
让我们看看如何为Windows安装Eclipse IDE。 Mac和Linux操作系统的步骤也几乎相似。 您必须对相应操作系统的Eclipse安装程序文件执行类似的步骤。
- Step 1: Go to the Eclipse official website and click Download button of Eclipse IDE icon. 步骤1 :转到Eclipse官方网站 ,然后单击Eclipse IDE图标的Download(下载)按钮。
-
- Step 2: Once the download is complete, run the exe file to start Eclipse installer application for Windows. 步骤2 :下载完成后,运行exe文件以启动Windows的Eclipse安装程序。
-
- Step 3: Click “Eclipse IDE for Java Developers” in the installer window. 步骤3 :在安装程序窗口中单击“ Eclipse IDE for Java Developers”。
-