10 Replies Last post: Oct 8, 2008 5:49 AM by Andras Hatvani  
Simon Stewart Advanced 75 posts since
Jan 10, 2008
Currently Being Moderated

Sep 28, 2008 12:29 PM

Merging WebDriver into Selenium

Hi everyone,

 

We've been making good progress on WebDriver and stabilising the code and improving performance. We're about to land some pretty major changes to the InternetExplorerDriver that make it safe to use from multiple (Java) threads. With all this progress, I think it makes sense to start the process of merging the projects. The following major technical work items are left on my list:

 

  • Add support to WebDriver for handling of javascript alerts, prompts and confirmations. I have a desired API, which I can cover that on another thread.

 

  • Complete the WebDriverBackedSelenium. This is an implementation of the "Selenium" interface in Java that uses WebDriver for the actual work (so no need for a Selenium RC server)

 

  • Start a SeleniumBackedWebDriver implementation. This will allow us to use the WebDriver interfaces on browsers where we haven't/can't write a native browser

 

  • Add a "TableRunner", allowing us to run the normal Selenium Core tests with WebDriver (actually the Selenium RC interfaces and a bunch of reflection)

 

  • Add more language support to WebDriver. There are branches for .Net and Python, and once those are done, but we also want support for Ruby.

 

  • Integrating with Selenium Grid is something that I would love to see. Philippe, let's get started on this!

 

Open questions include:

 

  • When do we move the WebDriver source from Google Code to Open QA? Obviously, after 1.0 is a good idea, so perhaps this is something that can wait until then before thinking about this again.

 

  • What will happen to the Google Code website? I'm quite fond of it, but there's probably a discussion about how best to import the wiki and issues from Google Code to Open QA's infrastructure. I may just sit up one night and copy the issues across. This is something that we've chewed over before, so I'm happy to continue those discussions outside of this thread.

 

  • There are a number of WebDriver contributers. It seems reasonable to me if they became Selenium contributers too, especially once we merge the subversion repositories.

 

I'd deeply appreciate some help with getting all this sorted out, because that's actually a fairly large piece of work. It's also an interesting piece of work! If anyone wants to get involved, now's the perfect time to do so. Who's interested in joining in?

 

Simon

Patrick Lightbody Hero 916 posts since
Nov 3, 2005
Currently Being Moderated
1. Oct 2, 2008 11:25 AM in response to: Simon Stewart
Re: Merging WebDriver into Selenium
  • When do we move the WebDriver source from Google Code to Open QA? Obviously, after 1.0 is a good idea, so perhaps this is something that can wait until then before thinking about this again.

 

I say we leave it as is until it's time to actually merge them. At that point, we won't need to create a new project but instead can just create a branch in one of the selenium projects (probably RC) and use that moving forward.

 

  • What will happen to the Google Code website? I'm quite fond of it, but there's probably a discussion about how best to import the wiki and issues from Google Code to Open QA's infrastructure. I may just sit up one night and copy the issues across. This is something that we've chewed over before, so I'm happy to continue those discussions outside of this thread.

 

This probably relates to the overall rebranding and update of openqa.org. We all pretty much agree that once Watir leaves OpenQA (they are in the process of doing that), that rebranding OpenQA to Selenium makes sense. In doing that, we'd make http://selenium.openqa.org be the main website and likely merge the content from the other projects in to that template. At that point, we'll likely have a good opportunity to upgrade/update the infrastructure bits (website, bug tracker, forums, etc), including pulling in anything we like from Google Code or even adopting parts of it.

 

  • There are a number of WebDriver contributers. It seems reasonable to me if they became Selenium contributers too, especially once we merge the subversion repositories.

 

Yes, I agree. Just email me their info and I can take care of that.

 

In general, I'm really excited about the work you're doing. I know we discussed in the past different ways to merge WebDriver in to Selenium, but perhaps you can reiterate your vision for how this will all work. Keep in mind the recent work Dan and Philippe have been doing. Specfically they modified the default modes of RC to use HTA mode, Chrome mode, and a privileged Safari mode.

 

My feeling is that WebDriver integration comes in two parts:

 

 

  • Improved browser automation (speed, reliability, additional automation outside of the DOM). Because chrome mode is pretty reliable already and WebDriver doesn't have great Safari support, my instinct is that the first candidate to replace is HTA mode and get WebDriver to become the IE automation engine for RC.

 

  • Improved APIs for all languages. I think at a high level, everyone agrees that there are two ways to run Selenium today: using the simple language in IDE or using a programming language with RC. Unfortunately, the RC API sucks, so adopting the WebDriver-style API would be a big win for RC.

 

I understand that RC isn't the ideal place to do the integration, since part of what WebDriver brings to the table is not being "remote", so we need to figure out a way to reconcile that in to the overall vision. I don't have a great solution, but I figure it probably involves a new project as well as possibly merging RC and Grid together to a single "remote" solution.

 

Anyone else have thoughts?

Haw-Bin Chai Master 515 posts since
May 19, 2006
Currently Being Moderated
2. Oct 2, 2008 1:05 PM in response to: Simon Stewart
Re: Merging WebDriver into Selenium

Simon, how are you finding the work distribution for WebDriver work? Not being much tapped in to the state of the WebDriver community / participation, it does sometimes seem like you're waging a one man battle.    I'd personally like to get a bit familiar with the WebDriver code - are there discrete, relatively small pieces of work you think you can section off and dole out?

 

Unfortunately, the RC API sucks, so adopting the WebDriver-style API would be a big win for RC.

 

Perhaps more could be done with our client drivers to make it the API seem less awkward ... for example I see Philippe has recently been doing some work to enhance the usability of the Ruby driver.

 

 

 

Haw-Bin

Patrick Lightbody Hero 916 posts since
Nov 3, 2005
Currently Being Moderated
3. Oct 2, 2008 1:18 PM in response to: Haw-Bin Chai
Re: Merging WebDriver into Selenium

Unfortunately, the RC API sucks, so adopting the WebDriver-style API would be a big win for RC.

 

Perhaps more could be done with our client drivers to make it the API seem less awkward ... for example I see Philippe has recently been doing some work to enhance the usability of the Ruby driver.

 

Yes, I think the general idea is to get the WebDriver API and the RC client drivers more in line. The only disconnect I see that we need to resolve is Simon's desire to allow WebDriver to work without any need to communicate over a wire protocol like SRC currently does. Other than that, I envision that "Selenium 2.0" (purposely defined as a broad and forward looking name - don't know what it'll really be yet) is very similar in my mind and Simon's mind: good APIs and solid IE, FF, and Safari support.

Andras Hatvani Almighty 567 posts since
Oct 16, 2006
Currently Being Moderated
6. Oct 3, 2008 8:10 AM in response to: Simon Stewart
Re: Merging WebDriver into Selenium

Hi Simon,

 

what do you mean by merging? Merging as a replacement, as an option or as a real merge by getting the best out of the two frameworks? Are they complementary, concurring or partially overlapping solutions?

I've searched the Selenium forum for WebDriver but I've found less than 20 matching entries and apart from this thread I didn't hear about it - so I started researching.

I found a funny discussion about Selenium RC vs WebDriver at GTAC 2007 between you and Jason, but I'm still not sure what are the main benefits over Selenium RC, which I use in several projects; so I also don't know whether it would be beneficial to switch.

What I read in the FAQ as main difference is that WebDriver controls the browser via the native API; I guess a similar way like Watir or WinRunner - both had drawbacks, too as does Selenium have as well, but other limitations.

To make a long story short: I'd love to read a feature comparison matrix to be able to decide which one to use in different projects.

 

I hope I didn't miss too much information being currently available; if somehow yes then I'd appreciate if you'd provide links to existing content.

 

Many thanks in advance,

Andras

Patrick Lightbody Hero 916 posts since
Nov 3, 2005
Currently Being Moderated
7. Oct 5, 2008 4:20 PM in response to: Simon Stewart
Re: Merging WebDriver into Selenium

Simon,

Glad you and I are on the same page. Philippe is on vacation for 2 weeks so I don't think we'll hear from him right away. But hopefully the rest of the team can tell us what they think.

 

For me, I think the trickiest thing will be getting a non-server solution working for all the major languages and browsers. The reason we went with the "SeleniumServer" module was because it allowed us to extract 99% of the complexity of automating the browsers via a proxy to a standard runtime. Perhaps initially we'd use your native hooks for IE and then for other browsers we'd have a Ruby/PHP/Pyhton/etc wrapper than just kicks off a SeleniumServer as needed and sends HTTP calls to localhost?

 

Patrick

 

 

Andras Hatvani Almighty 567 posts since
Oct 16, 2006
Currently Being Moderated
10. Oct 8, 2008 5:49 AM in response to: Simon Stewart
Re: Merging WebDriver into Selenium

Simon,

 

Thanks for your reply. An additional benefit you pointed out in the F.A.Q. is the way of handling JS.

Selenium's keypress event handling mechanism is still unreliable, so this would be an area, where

we could benefit from the usage of WebDriver.

I'll experiment with WebDriver and study the code base and in case of questions should arise I'll

contact you.

 

Cheers,

Andras

More Like This

  • Retrieving data ...