Browser automation framework

来源:互联网 发布:公司网络屏蔽视频 斗鱼 编辑:程序博客网 时间:2024/05/01 19:27

引用自:http://code.google.com/p/selenium/wiki/AndroidDriver?ts=1318649352&updated=AndroidDriver#Using_the_Android_Test_Framework

Selenium WebDriver is a browser automation tool whichprovides a lightweight and elegant way for testing web apps. Selenium WebDriveris now available as an SDK extra in the Android SDK, and supports 2.3(Gingerbread) and onwards!

Whether or not your site is optimized for mobile browsers,you can be sure that users will be accessing it from their phones and tablets.WebDriver makes it easy to write automated tests that ensure your site workscorrectly when viewed from the Android browser. Wellwalk you through some basics about WebDriver and look at it in action.

WebDriver Basics

WebDriver tests are end-to-end tests that exercise the webapplication just like a real user would. WebDriver models user interactionswith a web page such as finger flicks, finger scrolls and long presses. It canrotate the display and interact with HTML5 features such as local storage,session storage and the application cache. Those tests run as part of anAndroid tests project and are based on Junit. They can be launched from Eclipse or the command line. WebDriver testscan be wired with a continuous integration system and can run on phone andtablet emulators or real devices. Once the test starts, WebDriver opens aWebView configured like the Android browser and runs the tests against it.

WebDriver is an Android SDK extra and can be installedfollowingthese instructions. Once youvedone that youll be ready to write tests! There is acomprehensive WebDriveruser guide on the Selenium site, but lets start with a basic example usingwww.google.com to give you a taste of whats possible.


原创粉丝点击