从Selenium RC迁移到Webdriver的明显原因. [英] Obvious reason to move from Selenium RC to Webdriver.?

查看:102
本文介绍了从Selenium RC迁移到Webdriver的明显原因.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去4个月中,我一直在使用Selenium RC进行自动化测试.

From past 4 months am doing automation testing using Selenium RC.

但是最近我才知道Selenium RC已被弃用.有很多人建议我改用Selenium Webdriver.

But recently i came to know that Selenium RC is deprecated. So many people suggested me to change to Selenium Webdriver.

那么,任何人都可以告诉我Selenium RC的问题是什么以及Webdriver如何比RC更好吗?

So, can anyboby tell me whats the problem with Selenium RC and how Webdriver is better than RC ??

谢谢.

推荐答案

嗯,有多种原因.这里的顺序不大

Well, there are multiple reasons. Here are few in no particular order

  1. Webdriver提供了比Selenium RC更清洁的API.最常见的示例是您具有selenium.type和selenium.typeKeys,两者的作用相同. Webdriver仅提供一种用于所有类型相关操作的sendKeys方法.简而言之,您可以说,webdriver类的组织性更好?

  1. Webdriver offers a cleaner API than selenium RC. The most common example is you have selenium.type and selenium.typeKeys, both does the same thing in effect. Webdriver offers just one method sendKeys for all type related action. In short you can say, webdriver classes are better organized?

硒使用javascript注入工作.如果您使用硒已有一段时间,那么您必须了解相同的原产地政策问题和javascript注入的局限性. Webdriver通过为每个浏览器使用驱动程序来克服此问题.对于firefox而言,这意味着webdriver将自身作为附加组件附加到浏览器,对于IE,它使用自动化原子,对于chrome和Opera,则使用chrome驱动程序.

Selenium works using javascript injection. If you have worked with selenium for sometime, then you must be aware of the same origin policy issues and limitations of javascript injection. Webdriver overcomes this by using a driver for each browser. For firefox this means, webdriver attaches itself to browser as an addon, for IE it uses automation atoms and for chrome and opera it uses the chrome driver.

由于上述原因,webdriver测试比Selenium更快

Due to the above mentioned reason, webdriver tests are faster than Selenium

与硒相比,扩展webdriver更加容易. Webdriver提供了可扩展的动作类,您可以组合并创建自己的自定义动作.

Its much easier to extend webdriver compared to selenium. Webdriver provides extendable action classes which you can combine and create your own customized actions.

Webdriver可以支持在Iphone,ipad以及android手机和平板电脑等移动设备上进行测试.

Webdriver can support testing in mobile devices such as Iphone, ipad and android phones and tablets.

最后但至少没有,硒项目现在没有开发工作.不管现在有什么可用,都将继续受支持,但是硒没有新的方法或增强功能. Selenium和webdriver项目在几年前合并,成为Selenium 2.0

Last but not at all the least, there is no development work happening in selenium project now. Whatever is available now, will continue to be supported but no new methods or enhancements are happening for selenium. Selenium and webdriver projects were merged some years back and became Selenium 2.0

您可以在此处以及合并原因

You can find additional details about webdriver here and reason for merger here

这篇关于从Selenium RC迁移到Webdriver的明显原因.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆