rc与webdriver区别

Selenium RC 工作原理:

1. RC server 在服务端启动 浏览器 并将Core 注入到浏览器中 (为了解决浏览器的同源策略)

2. 我们的测试脚本调用Client API,Client将操作转化成标准的selenese语句发送给RC Server。

3. Selenium Core 解释selenese 语句,通过js的方式操作浏览器。

Web driver 工作原理:

1. WebDriver 启动目标浏览器,并绑定到指定端口。该启动的浏览器实例,做为web driver的remote server。

2. Client 端通过CommandExcuter 发送HTTPRequest 给remote server 的侦听端口(通信协议: the webriver wire protocol)

3. Remote server 需要依赖原生的浏览器组件(如:IEDriver.dll,chromedriver.exe),来转化转化浏览器的native调用。

  • Selenium-WebDriver makes direct calls to the browser using each browser’s native support for automation. How these direct calls are made, and the features they support depends on the browser you are using. Information on each ‘browser driver’ is provided later in this chapter.
  • For those familiar with Selenium-RC, this is quite different from what you are used to. Selenium-RC worked the same way for each supported browser. It ‘injected’ javascript functions into the browser when the browser was loaded and then used its javascript to drive the AUT within the browser. WebDriver does not use this technique. Again, it drives the browser directly using the browser’s built in support for automation.

对于优缺点:

1. RC 需要启动一个 RCserver,就直观感觉上多了一个步骤。

2. RC 采用js 的方式,稳定性和兼容行方面还是取决与js的代码的质量。有时需要自己去写js代码来扩展相应的功能。由于自己是从RC用起的,对于RC js的方式还是比较接受,感觉比较灵活。

3. 至于弹出对话框和警告框的处理,RC原生是不支持的。不过可以通过第三方软件来解决,比如autoit。我用的就是autoit,使用简单方便,是一个不错的工具

  • Android WebDriver allows to run automated end-to-end tests that ensure your site works correctly when viewed from the Android browser. Android WebDriver supports all core WebDriver APIs, and in addition to that it supports mobile spacific and HTML5 APIs. Android WebDriver models many user interactions such as finger taps, flicks, finger scrolls and long presses. It can rotate the display and interact with HTML5 features such as local storage, session storage and application cache.
  • Supported Platforms

The current apk will only work with Gingerbread (2.3.x), Honeycomb (3.x), Ice Cream Sandwich (4.0.x) and later.

      Note that there is an emulator bug on Gingerbread that might cause WebDriver to crash. 
  The last version to support Froyo (2.2) is 2.16. 

  --待研究
注意:进行此处自动化之前,需要先学习JUNIT+Eclipce

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值