Jak zainstalować Selenium Sterownik sieciowy
⚡ Inteligentne podsumowanie
Instalacja Selenium WebDriver requires four sequential steps: setting up Java JDK, installing Eclipse IDE, downloading the Selenium Sterownik sieciowy Java client, and configuring Eclipse with WebDriver libraries before writing your first test.

Selenium Instalacja WebDrivera
Selenium instalacja składa się z 4 etapów:
Krok 1: Zainstalować Java SDK
Krok 2: Zainstalować Eclipse
Krok 3: Zainstalować Selenium WebDriver Files
Krok 4: Konfigurowanie Eclipse IDE z WebDriverem
W tym samouczku dowiemy się, jak zainstalować Selenium WebDriver. Below is the detailed process.
UWAGA: wersje Java, Eclipse, Selenium will keep updating with time. But the installation steps will remain the same. Please select the latest version and continue the installation steps below.
Krok 1 – Zainstaluj Java Zestaw programistyczny (JDK)
Pobierz i zainstaluj Java Zestaw programistyczny (JDK) w tym miejscu.
Ta wersja JDK jest dostarczana w zestawie Java Runtime Environment (JRE), więc nie trzeba pobierać i instalować środowiska JRE osobno.
Uwaga: Download the latest available version of the JDK when accessing the download page. The specific version is not critical. As of the writing of this tutorial, the current version is 24.
Once installation is complete, open a command prompt and type java. If you see the following screen, you are good to move to the next step.
Krok 2 – Zainstaluj Eclipse IDE
Pobierz najnowszą wersję "Eclipse IDE dla Java Deweloperzy” w tym miejscu. Be sure to choose correctly between the Windows Wersje 32-bitowe i 64-bitowe.
You should be able to download an exe file named eclipse-inst-win64 do konfiguracji.
Double-click the file to start the Eclipse installer. A new window will open. Click Eclipse IDE dla Java Programiści.
A new window will open. Click the path button (marked 1) and change the install path to C:\eclipse. Następnie kliknij przycisk Zainstalować button (marked 2).
After successful installation, a window will appear. Click Premiera.
To rozpocznie Eclipse IDE for you.
Krok 3 - Selenium Instalacja WebDrivera
Pobierz Selenium Sterownik sieciowy Java Kierowca klienta w tym miejscu. You will find client drivers for other languages on that page, but select only the one for Java.
This download comes as a ZIP file named selenium-4.30.0. For simplicity, extract the contents of this ZIP file to your C drive so that you have the directory C:\selenium-4.30.0\. This directory contains all the JAR files that you will later import into Eclipse.
Krok 4 - Konfiguruj Eclipse IDE z WebDriverem
- Uruchom
eclipse.exeplik wewnątrzeclipsefolder. If you followed step 2 correctly, the executable is atC:\eclipse\eclipse.exe. - Gdy zostaniesz poproszony o wybranie obszaru roboczego, zaakceptuj domyślną lokalizację.
3. Create a new project through Plik > Nowy > Java Projekt. Name the project newproject.
A new pop-up window will open. Enter the following details:
- Nazwa projektu
- Location to save the project
- Wybierz środowisko wykonawcze JRE
- Wybierz opcję projektu układu
- Kliknij Zakończyć
4. In this step:
- Right-click on the newly created project.
- Wybierz New > Package and name the package
newpackage.
A pop-up window will open. Enter the package name and click Zakończyć.
5. Utwórz nowy Java class under newpackage by right-clicking it and selecting New > Class. Nazwij to MyClass. Twój Eclipse IDE powinno wyglądać jak na obrazku poniżej.
Po kliknięciu Klasa, a pop-up window will open. Enter the class name and click Zakończyć.
This is how the workspace looks after creating the class.
Now you need to add the Selenium WebDriver libraries to the Java Build Path. In this step:
- Kliknij prawym przyciskiem myszy
newprojectna której: Właściwości. - In the Properties dialog, click Java Ścieżka budowania.
- Kliknij ikonę biblioteki patka.
- Kliknij Dodaj zewnętrzne pliki JAR…
When the file browser opens:
- Select the JAR files downloaded from the Selenium website in Step 3.
- Kliknij Otwarte.
- The files will be added to the library list.
6. Add all JAR files from inside and outside the libs folder. Your Properties dialog should now look similar to the image below.
7. Na koniec kliknij OK. Selenium libraries are now imported into your project.
Browser Driver Servers
HTMLUnit is the only browser that WebDriver can automate directly — no separate component is required. For all other browsers, a separate program called a Serwer sterowników jest potrzebne.
A driver server is specific to each browser. You can download these drivers from the Selenium oficjalna strona.
| Przeglądarka | Driver Server Name | Uwagi |
|---|---|---|
| Jednostka HTML | Sterownik HTMLUnitDriver | WebDriver drives HTMLUnit natively using HtmlUnitDriver — no additional server needed. |
| Firefox | Sterownik Mozilla GeckoDriver | Wymagane do Firefox 45 and above; created and maintained by Mozilla. |
| Internet Explorer | Serwer sterowników programu Internet Explorer | Available in 32-bit and 64-bit versions. Use the version matching your IE architecture. |
| Chrom | Sterownik Chrome | Functions as a full driver server. Supports Chrome v21 and higher. |
| Opera | OperaKierowca | Functions as a full driver server for Opera browser. |
| PhantomJS | GhostDriver | PhantomJS is a headless browser, similar to HTMLUnit. |
| Safari | SafariDriver | Functions as a full driver server for Safari browser. |



















