AndroidDriver - 在Andriod中执行Selenium测试

AndroidDriver - 在Andriod中执行Selenium测试

The Android Driver uses the RemoteWebDriver. The client side is your test code. The server side is an application that gets installed on the android emulator or device. It uses the RemoteWebDriver Server component and embeds a light-weight HTTP server (Jetty). The client and the server communicate using the Wire Protocol which consists of REST requests using JSON over HTTP. The application executes the tests in the context of an Android WebView.

Pros & Cons

Pros

  • Runs in Android browser
  • Uses native touch events to emulate user interaction
  • Runs on emulator and device

Cons

  • Slower than Headless WebKit Driver
  • Support for SDK versions 2.2 and prior, has been deprecated. The driver is unlikely to work reliably on these versions. There were several limitations, for instance XPath wasn't supported natively and the Android Driver used to inject an Xpath library in WebView. We recommend using devices with version 2.2 or later.
  • Does not work on emulators running 2.3 because of an emulator bug that should be fixed soon by Android. However it works on Devices running 2.3 and higher (and runs much faster on those).

http://code.google.com/p/selenium/wiki/AndroidDriver

posted on 2011-03-27 15:30  TIB  阅读(1503)  评论(0编辑  收藏  举报

导航