简体   繁体   中英

Selenium Drivers

I am initiating on browser automation tests using Selenium WebDriver, and while reading the tutorial I got blocked in a point.

In the Selenium WebDriver's Drivers topic where it explains the pros and cons of each WebDriver implementation , it says the following about the HtmlUnit driver:

HtmlUnit is a java based implementation of a WebBrowser without a GUI

So this means that this driver is equal to a browser application (like Mozzila,Opera or Chrome) without the GUI, we can only interact with it through methods

Firefox Driver

Runs in a real browser and supports JavaScript Controls the Firefox browser using a Firefox plugin. The Firefox Profile that is used is stripped down from what is installed on the machine to only include the Selenium WebDriver.xpi (plugin). A few settings are also changed by default (see the source to see which ones) Firefox Driver is capable of being run and is tested on Windows, Mac, Linux. Currently on versions 3.6, 10, latest - 1, latest

What does this mean? To use this driver, do I have to install Firefox on my machine ? When it says that it "runs in a real browser," does it mean that the multiple commands that we use with the WebDriver interface are sent to the browser installed in our machine ?

If my assumption is correct, if we run the test on the Selenium-Server should the machine where the server is installed have Firefox installed?

您的假设是正确的,如果使用的是Selenium则需要安装浏览器,而HtmlUnit的Gui较少(无需安装GUI)

Yes absolutely your assumption is correct. You need to install Firefox browser to use FirefoxDriver where as for HtmlUnitDriver no browser needed.

See below link to see basic programs using HtmlUnitDriver & FirefoxDriver https://code.google.com/p/selenium/wiki/GettingStarted

In the same way you can run your tests in IE using InternetExplorerDriver .

Chrome, Opera drivers also available but not developed by seleniumhq

You can download all types of driver from below link

http://docs.seleniumhq.org/download/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM