robotframework / OldSeleniumLibrary

Deprecated Selenium library for Robot Framework
Apache License 2.0
13 stars 3 forks source link

selenium 2/webdriver support #196

Closed spooning closed 9 years ago

spooning commented 9 years ago

Originally submitted to Google Code by jorge.b... on 18 May 2011

since it is currently running under selenium 1, it would be cool to have webdriver behind the scenes

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 19 May 2011

Could you list benefits end user would get if the library library would use Selenium 2 (i.e. WebDriver) APIs instead of Selenium 1 APIs?

spooning commented 9 years ago

Originally submitted to Google Code by jorge.b... on 20 May 2011

to list some:

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 23 May 2011

About the benefits:

1) htmlunit support I agree this is a big win.

2) faster Didn't know about that. Sounds good.

3) cleaner api We've never had that big problems with the old API. Learning new one is probably a bigger problem.

4) does not require rc server Sounds good, but... Doesn't it then require browser dependent plugins or something like that? Makes creating a generic installation package quite hard.

Problems:

1) Lot of work converting all the old keywords to use the new API. I doubt anyone is interested in taking care of that unless there's some kind of a bridge API that helps.

2) Non-uniform APIs between browsers. When I studied WebDriver some time ago you needed to initialize and also to some extend use different browsers differently. Biggest difference were with the HtmlUnit backend. I don't know has the situation changed -- please comment here if it has -- but handling these differences may turn out to be difficult. We cannot, however, make selecting the browser any harder than it is now for the end user.

3) Possible backward incompatible changes. I doubt Selenium 1 and Selenium 2 (a.k.a. WebDriver) behave 100% identically. Luckily we have pretty comprehensive tests for the library so we can easily verify what works and what doesn't, but handling possible changes can be challenging.

Because of the possible problems it might actually be better to start a new project, something like Selenium2Library, that uses the new WebDriver based API. It should have same keywords as the current version to make migrating easier, but it could break backwards compatibility in places where keeping it is hard or impossible. The project could obviously reuse the old tests, old keyword documentation, and also some of the old code.

spooning commented 9 years ago

Originally submitted to Google Code by jorge.b... on 23 May 2011

could selenium2library be an extension based on the robot-java libraries therefore it could be written on java? ;)

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 23 May 2011

It's up to the person interested in implementing such library to select the language.

spooning commented 9 years ago

Originally submitted to Google Code by r... on 22 Jun 2011

I am just now getting my team started with Selenium and Robot, so backward compatibility for us is not an issue, and we definitely want to be using Selenium 2/WebDriver. I suspect there will be a growing number of people in a like situation.

Regarding the problems outlined:

1) Since we're just getting started, we wouldn't consider building out a new test suite using Selenium 1/RC. So I am interested in writing this library and contributing it back to this community. It won't be a trivial amount of work, but I don't expect it to be particularly challenging.

2) A fundamental design goal of WebDriver as I understand it is to normalize the non-uniform APIs between browsers into a single unified interface so that browser implementations can be interchangeable. My brief experience writing code with it has validated that.

3) This is a legitimate concern. Some of the existing keywords just simply don't apply to Selenium 2/WebDriver (e.g. Start Selenium Server, Stop Selenium Server, Add Location Strategy). It's probably very few of your existing keywords, but an issue nonetheless.

I agree with you, Pekka, that it probably makes most sense to fork the code and start a new project. Reuse of the tests and keyword documentation would be really valuable.

My basic approach would be:

I want to make sure this team is supportive of the effort and has a chance to offer suggestions before getting too far along.

What is the most-favored name for the new project?

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 23 Jun 2011

Very fast comments:

1) Sounds awesome and the core team will definitely support this!

2) I'd prefer Selenium2Library over SeleniumWebDriverLibrary but a more generic name like WebLibrary would be fine too.

3) When you get started, please send a note to robotframework-users list. I'm sure there are others who are interested and possibly also people who could contribute.

spooning commented 9 years ago

Originally submitted to Google Code by r... on 23 Jun 2011

Thanks for your support. I will get started soon and send a note to the user list as you suggest.

spooning commented 9 years ago

Originally submitted to Google Code by jeremy on 6 Oct 2011

Has anybody gotten started with this? I have a requirement from a client to do this and I'm about to start, but it makes most since to leverage what is already out there. Anyone?

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 7 Oct 2011

This has been intensively discussed on robotframework-users list recently: http://groups.google.com/group/robotframework-users/browse_thread/thread/7e06c8d40616fe1d/4b8fabf67d3e40ad

Apparently Ryan Tomac has already done something but there's, AFAIK, nothing public available yet. Please join the discussion!

spooning commented 9 years ago

Originally submitted to Google Code by @yanne on 14 Dec 2011

The Selenium2Library utilizing the Webdriver API is now publicly available at GitHub: https://github.com/rtomac/robotframework-selenium2library

So, this project will keep using the RC API, and perhaps we'll should just fade this out eventually.

spooning commented 9 years ago

Originally submitted to Google Code by ssit.ki... on 19 Mar 2012

Seleniumhq.org has stopped technical support for Selenium RC, any new bug fixes, enhancements on selenium is happening only on selenium webdriver. so it will be good to have support for webdriver. And the framework code should always be future proof, and should be able to handle new releases od automation tool and change in syntax of automation tool, eg: now there is a wide difference in change in syntax between selenium RC and Selenium webdriver.

As per the lessons learnt people are struggling to convert there RC scripts to webdriver as it requires lots of efforts.

spooning commented 9 years ago

Originally submitted to Google Code by @yanne on 19 Mar 2012

ssit.kiran, please check out the selenium2library: https://github.com/rtomac/robotframework-selenium2library, which provides the same keywords as SeleniumLibrary, but using the Selenium Webdriver bindings.

There are some incompatibilites, but not that many, I think.

spooning commented 9 years ago

Originally submitted to Google Code by bfzt... on 1 May 2012

I am new in using Selenium Web driver. Tried some different links to download selenium2 Library, but kind of stuck what to do next. Can any one help me out suggesting the steps. I am using Robotframework and RIDE. In order to use selenium Web driver, what are the things that I should use? My machine is 64 bit.After I downloaded selenim 2 Library from https://github.com/rtomac/robotframework-selenium2library/downloads link.and it installed the files in my Python27 folder's Lib>Site Packages directory. Is it right? after that what should I do? Some guideline would help a lot. Thanks.

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 2 May 2012

Selenium2Library related issues should be submitted to that project's issue tracker and general questions asked on robotframework-users mailing list.