selenium webdriver译文(二):WebDriver and the Selenium-Server

译文:webdriver和selenium-server

你是否需要selenium server,这取决于你怎么用webdriver。如果你只是想用webdriver的API,你就不需要selenium-server。如果浏览器和测试用例运行在同一台机器上,而且你的测试脚本里只用到了webdriver api,你也不需要selenium-server,因为webdriver可以直接操作浏览器。

下面是需要用到selenium-server的场景:

1)使用selenium-grid,在多机器或多虚拟机上运行测试用例。

2)你想连远程机器使用它的浏览器。

3)你没有用到java bindings(例如python, C#, or Ruby),比如使用Htmlunit Driver。

注:This(Htmlunit Driver) is currently the fastest and most lightweight implementation of WebDriver. As the name suggests, this is based on HtmlUnit. HtmlUnit is a java based implementation of a WebBrowser without a GUI. For any language binding (other than java) the Selenium Server is required to use this driver.

Htmlunit Driver是当今最快最轻量级的webdriver应用。顾名思义,它是基于HtmlUnit的。HtmlUnit是一款基于无界面浏览器实现的java(这句要怎么翻啊??)。任何绑定selenium server的语言(除了java)都需要Htmlunit Driver.

注2: HtmlUnit 是 JUnit 的扩展测试框架之一.

 

欢迎光临娇娇家的美衣阁 http://shop105984718.taobao.com/

原文:http://docs.seleniumhq.org/docs/03_webdriver.jsp#webdriver-and-the-selenium-server

You may, or may not, need the Selenium Server, depending on how you intend to use Selenium-WebDriver. If you will be only using the WebDriver API you do not need the Selenium-Server.  If your browser and tests will all run on the same machine, and your tests only use the WebDriver API, then you do not need to run the Selenium-Server; WebDriver will run the browser directly.

There are some reasons though to use the Selenium-Server with Selenium-WebDriver.

  • You are using Selenium-Grid to distribute your tests over multiple machines or virtual machines (VMs).
  • You want to connect to a remote machine that has a particular browser version that is not on your current machine.
  • You are not using the Java bindings (i.e. Python, C#, or Ruby) and would like to use HtmlUnit Driver

posted on 2014-08-28 17:09  娇娇家的美衣阁  阅读(273)  评论(0编辑  收藏  举报

导航