Selenium RC architecture and Selenium WebDriver architecture differences

折月煮酒 提交于 2019-12-07 16:39:15

问题


Hi I want differences between architectures of selenium RC and webDriver. I read lot of functional differences but did not find anything for architecture differences.

If anyone can send/post links of differences that will really appriciate.

Thanks in advance


回答1:


The difference is quite substantial.

Selenium RC works only using JavaScript for its every command. That means that everything you write is eventually translated into Javascript and run in the browser. This approach has several pros and cons - it should work the same way in every browser, but is limited to "same origin policy" and to JavaScript limitations.

http://seleniumhq.org/docs/05_selenium_rc.html#how-selenium-rc-works

WebDriver actually uses each browser's own and native API's to work with them. That means that it sometimes needs direct help from browser development team, sometimes fails on a new browser version release, sometimes behaves slightly differently on different browsers (but hey, on IE, js was also not the most reliable thing), but is a much stronger tool overall. It should be faster, it should allow for much more complex work without any js limitations.

http://seleniumhq.org/docs/03_webdriver.html#how-does-webdriver-drive-the-browser-compared-to-selenium-rc

Note that while Selenium RC has been oficially deprecated, the WebDriver is now being developed rapidly and it still suffers from several child-illnesses and is not in its full strength. That said, using WebDriver, you can do anything Selenium RC can do. And sometimes more. With an occasional minor bug.




回答2:


here you can Selenium Webdriver Architecture http://qeworks.com/selenium-webdriver-architecture/

you can also find diff. between RC and webdriver below http://qeworks.com/difference-between-selenium-rc-and-selenium-webdriver/




回答3:


Though there are many advantages of Page Project Model, some of them worth mentioning are :

  1. Simple and clear page classes with sensible method names.

  2. You can actually give the customize names to you methods. Like above so that you need not to keep anything in mind.

  3. Just looking into the method name gives you all idea about the capabilities of the method.

  4. Makes tests more readable. In comparison to above commands of selenium , where in you need to add all the commands in the tests scripts . in page object model you need to put method names. The methods which you have created according to your understanding of application so these methods name are more readable and easy to understand.

  5. Stay [DRY] Page object model believes in the principle of Do not repeat yourself.

  6. Good support of tests, because everything is stored in one place.

  7. Easy creation of new tests. In fact, tests can be created by a person not knowing the features of automation tools.

As I have actually implemented it in my project so definitely there are some flaws:

  1. All locators should be kept in page class file.

  2. And this abstraction leads to some chaos with in the Page Class file. So you need to implement something like key word driven on top of Page Object Model so as to fully take the advantages.



来源:https://stackoverflow.com/questions/10285641/selenium-rc-architecture-and-selenium-webdriver-architecture-differences

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!