Here are my suggested Google Summer of Code project ideas.
Should we propose them?
Yes, I know this is last minute. We have until 6pm EST today (3/12/2010).
Expect the first to be part of the Selenium project page
and the second one to be on a Watir project page.
######################################################
Safari Driver/Target for ruby-based selenium-webdriver
---------------------------------------------------------------------------
Summary
Create safari browser driver (:safari) for the ruby-based
selenium-webdriver gem to be uses with watir-webdriver.
Tags
Se2, webdriver, watir, watirspec, watir-webdriver
Status
Draft
Mentor
TBD (technical)
Al Snow (general/watir community contact)
Description
The current selenium-webdriver does not support the safari
browser. Previous research suggests that the :remote
target, code within the safariwatir tool, backseat in github,
and firedriver in github may jump start this development.
The overall goal is to use this in connection with watir-webdriver
and run it against watirspec (similar to rubyspec).
Background:
http://my-ruby-journey.blogspot.com/2010/02/chapter-58-watir-webdriver-journey.html
=============================================================
Finish watirspec (clean run) against watir-webdriver
----------------------------------------------------------------------
Summary
Get watir-webdriver to run all of the watirspec specs cleanly.
Possible targets include :ie, :ff, and :chrome.
Tags
watir, webdriver, watir-webdriver
Status
Draft
Mentor
TBD (technical)
Al Snow (general/watir community contact)
Description
Watirspec is a set of ruby-based specs that
specify how watir-webdriver should work.
===================================================================
TODO's:
Twitter: @safariwatir, @watir
IRC: #watir
E-groups:
wtr-development@rubyforge.org
watir-general@googlegroups.com
webdriver@googlegroups.com
selenium-developers@googlegroups.com
Three main developers:
Jari Bakken (watir-webdriver, @jarib),
Simon Stewart (selenium-webdriver, @shs96c),
Tom Copeland (@safariwatir)
Friday, March 12, 2010
Sunday, February 28, 2010
Chapter 59: Creating Ruby-based Safari Driver for Selenium-webdriver
My Letter to the Watir/Selenium Communities:
Everyone,
For the past several weeks, I have been working with the new version
of Watir (watir-webdriver). I have documented my journey on my wiki
and one of my blogs (Chapters 51-58, see last one for current summary).
Now it is time to check in and verify what other people have been doing
in this area (especially with the safari driver for watir-webdriver) and
see if other people would like to help to create a "branch" (fork)
for this work.
I will update my blog with the responses and post to
the wtr-development and webdriver e-groups.
Thanks in advance,
Al Snow
Linkedin: http://www.linkedin.com/in/alsnow
Google Talk: jasnow1
Twitter: jasnow
PS. Remember to include :
Twitter: @safariwatir
IRC: #watir
E-groups:
wtr-development@rubyforge.org
watir-general@googlegroups.com
webdriver@googlegroups.com
selenium-developers@googlegroups.com
Three main developers: Jari, Simon, Tom
Everyone,
For the past several weeks, I have been working with the new version
of Watir (watir-webdriver). I have documented my journey on my wiki
and one of my blogs (Chapters 51-58, see last one for current summary).
Now it is time to check in and verify what other people have been doing
in this area (especially with the safari driver for watir-webdriver) and
see if other people would like to help to create a "branch" (fork)
for this work.
I will update my blog with the responses and post to
the wtr-development and webdriver e-groups.
Thanks in advance,
Al Snow
Linkedin: http://www.linkedin.com/in/alsnow
Google Talk: jasnow1
Twitter: jasnow
PS. Remember to include :
Twitter: @safariwatir
IRC: #watir
E-groups:
wtr-development@rubyforge.org
watir-general@googlegroups.com
webdriver@googlegroups.com
selenium-developers@googlegroups.com
Three main developers: Jari, Simon, Tom
Here is where I will post the responses/reactions.
Friday, February 26, 2010
Chapter 58: Creating Ruby-based Safari Driver for Selenium-webdriver
GOAL: Get experience with ruby-related, Watir-related technologies. Do no harm.
RESPONSE TO EMAIL in Blog Post #59:
MORE RESPONSES (Jari's Emails: 3/2/2010)
EVEN MORE RESPONSES (Jari's Emails: 3/3/2010)
- Listen to watir podcast (#31/Jari Bakken+Simon Stewart). (35 minutes) (2/26/2010: done)
- Listen to safariwatir watir podcast (#25/Dave Hoover) (2/26/2010: done/50 minutes)
- Listen to (#28/Tom Copeland) (2/26/2010: done)
- Read introducing-webdriver blog. (2/26/2010: done)
- Re-read chapters 51-56+ of my blog. (2/26/2010: done)
- Decide if I care about safari driver on PC (or just MAC, IPhone, IPad).
(2/26/2010: Decide that the stub can run on PC and MAC platforms) - Research safariwatir. (2/26/2010: done/Found most of the interesting
emails/blogs/postings; safariwatir on openqa (overall page)) - selenium-webdriver is located at: http://github.com/shs96c/webdriver
- Set up Eclipse, Netbeans, or RubyMine as IDE. (2/26/2010: Installed
Eclipse on PC, configured for Ruby, build selenium-webdriver project) - GOAL: Clone (fork) selenium-webdriver and add safari driver stub code.
- Use this ruby/watir script as my first test case. My past work documented here.
require "watir-webdriver"
browser = Watir::Browser.new(:safari)
sleep 2
browser.close
browser = Watir::Browser.new(:safari)
sleep 2
browser.close
- FYI: My previous research appears that "safari" driver work completely
be isolated inside selenium-webdriver. - 2/26/2010: Set WATIR_WEBDRIVER_BROWSER to "safari" and
use ":safari", I saw "unknown driver" message with a stub. - 2/26/2010: Added two line to driver.rb file and rerun test file.
- 2/26/2010: NOTE: "jobbie" directory is IE code.
- 2/26/2010: Got stuck on no gemspec for selenium-webdriver so stop for now.
- Installed jeweler (1.2.1): gem install technicalpickles-jeweler
- 2/27/2010: After sleeping on it and finding that the selenium-webdriver is
probably embedded deep inside selenium, I have decided to decide on this tomorrow. - 2/28/2010: Deciding on how to trim this Yak (add ruby-based safari-driver to
selenium-webdriver running under watir-webdriver). - 2/28/2010: Decided to write an email to inform people, e-groups, IRC,
twitter of my work. Ask for past work and help, then decide course.
- Assume everyone follows one of the appropriate e-groups.
- Will use webdriver@googlegroups.com and selenium-dev lists.
Also the wtr-development@rubyforge.org list (on Rubyforge IIRC).
Then watir-general@googlegroups.com. (only once) - Maybe use IRC (freenode) with #watir.
- Also @safariwatir on twitter.
- Contact people involved:
- Jari Bakken (watir-webdriver) -- jarib/watir-webdriver on github
- Simon Stewart (selenium-webdriver) (0.0.17)
- Sai (Thoughworker) - was:
- Contact Sai, Prashant@Sun/Oracle.
- Dave Hoover (original safariwatir author) - more in section 6.20 of my notebook.
- Tom Copeland (lead safariwatir developer) (0.3.37) (NOTE: Work with Tom
if we decide (probably use submodule) to merge safariwatir as safari driver guts.
RESPONSE TO EMAIL in Blog Post #59:
- Doing research on how to add software to existing open source projects. Wow,
this is the only thing I found where google-ing.
http://my-ruby-journey.blogspot.com/2010/02/chapter-58-watir-webdriver-journey.html
Best Practices for Working with Open-Source Developers.\ - Received one new follower of my blog.
- My own thoughts:
- Blog #58 Creating Ruby-based Safari Driver for Selenium-webdriver
- GOAL: Clone (fork) selenium-webdriver and add safari driver stub code.
- Look into how Simon creates the current selenium-webdriver to avoid forking the code.
- If I must fork the code, use selenium-webdriver gem code (put in Git as
selenium-webdriver-ruby) since it is easier, then back-port it later. - Copy the code for one of the existing drivers and rename it to ":safari" initially.
- Probably set up submodule for safariwatir code if I/we use it.
- Webdriver thread about selenium-webdriver:
http://groups.google.com/group/webdriver/browse_thread/thread/df6d285d05f87cf5/939f96ccba24027f#939f96ccba24027f - Also look at the "native safari webdriver plugin".
From Miklos on webdriver@googlegroups.com e-group, I got the following: Please note that webdriver has a safari branch were the native safari
webdriver plugin development is ongoing:
http://code.google.com/p/selenium/source/browse/#svn/branches/safari
- Try to get local help at local Ruby Study Group, global Watir/Selenium
community, and/or create local help group. Apply to GSOC as a mentor. - Also found that: Google Summer of Code 2010 is on! We will begin accepting
applications from mentoring organizations on March 8th http://socghop.appspot.com - Local Ruby User Group Information
- 2/28/2010: Sent him suggestion for next Emerald City Programming
Group meeting; responded that Cucumber was the topic next Sat.) - Emails: ruby-83@meetup.com , ruby-83-announce@meetup.com
- IRC: #atlrug on webchat.freenode.net/ (2/28/2010: Logged in; Also
checked out #watir and #selenium IRC channels.)
- 2/28/2010: Sent him suggestion for next Emerald City Programming
- Also: http://github.com/jim/backseatSteer WebDriver from Ruby —
http://autonomousmachine.com/2008/10/17/steer-webdriver-from-ruby-with-backseatBackseat is a proof of concept that uses Rjb to directly interact with the
WebDriver Java classes. I'm still thinking about the API, so no specs just yet.EXAMPLES:
Please see firefox_example.rb and htmlunit_example.rb in the examples
directory for implementations of the 2 official WebDriver examples from
http://code.google.com/p/webdriver/wiki/GettingStarted.REQUIREMENTS:
a working JVM- you may need to set your LD_LIBRARY_PATH
http://rjb.rubyforge.org/rjb - sudo gem install rjb, if you're on a Mac go here:
http://www.digitalsanctum.com/2008/02/02/gem-install-rjb-on-mac-os-x-leopard/
TODO:
Safari driver ...lots mor
- Also: http://github.com/saivenkat/firedriver (A FireWatir implementation with
WebDriver core (A valiant attempt to free FireWatir from crummy JSSH) - http://developer-in-test.blogspot.com/2009/04/firedriver-firewatir-webdriver.html
- AFTER STUB: Where to learn more about safari drivers?
- Look at selenium-webdriver ticketing system. (unclear where that is)
- Set up safariwatir on Mac (maybe merge with selenium-webdriver). Clone code:
git clone http://github.com/redsquirrel/safariwatir.git (2/26/2010: done on PC/Must do on MAC too). - Study webdriver-safari code on openqa. (2/26/2010: Deferred)
- Maybe fork watirspec later.
- Will focus less on watirspec until after creating the STUB.
> My focus is to glue the ruby-based watir-webdriver and selenium-
> webdriver
> code together with existing (or new if we have to) safari driver code
watir-webdriver doesn't need any code changes to work with new drivers
introduced in the selenium-webdriver back-end. As long as the Safari
driver honors the semantics of the WebDriver API, it should all just
work from the Watir side.> Do you have the gemspec files embedded in your selenium code tree
> to build the gem for the ruby-based selenium-webdriver gem that I
> found on gemcutter.org (http://rubygems.org/gems/selenium-webdriver)?
There's no gemspec file, but you can build the gem using `rake gem:gem` in
your working copy.- > After we get the ruby glue code in place, then we can see what safari-specific
> code is best to use (your java version, safariwatir version, etc).
Since the Safari driver is based on the remote driver, the amount of work needed to make it
work from Ruby is practically negligible. If you're interested in how the Safari driver is
implemented natively,you should look at the branch linked in Miklos email.
EVEN MORE RESPONSES (Jari's Emails: 3/3/2010)
- Which gem are you talking about watir-webdriver or selenium-webdriver? selenium-webdriver
- What "working copy" are you talking about? http://code.google.com/p/selenium/source/checkout
Chapter 57: Watir-Webdriver Journey
Letter Asking for Status of Safari Driver for selenium-webdriver
- Is anyone working on the "safari" port of watir-webdriver/selenium-webdriver?
- If I set WATIR_WEBDRIVER_BROWSER to "safari" and use ":safari", I get "unknown driver".
- Before I start peeling the onion (a fork), I would like to ensure that no one is working on the safari port.
- FYI: Here is my recent work at Chapters 51-56 of my blog: http://my-ruby-journey.blogspot.com/
- My previous research appears that "safari" port work completely be isolated inside selenium-webdriver.
- Found this:
- -- http://nexus.openqa.org/content/repositories/releases/org/openqa/selenium/webdriver/webdriver-safari/
- -- http://groups.google.com/group/webdriver/browse_thread/thread/65b317dcad5399a6?pli=1
- Also know about safariwatir and can maybe merge this with the selenium-webdriver code, but this is onlyfor Apple (Applescript/not PC), so still pondering.
Wednesday, February 24, 2010
Chapter 56: Watir-Webdriver Journey
1. If I set "WATIR_WEBDRIVER_BROWSER" to "safari".
2. Use this ruby/watir script:
require "watir-webdriver"
browser = Watir::Browser.new(:safari)
sleep 2
browser.close
3. Then I get this:
C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/selenium-webdriver-0.0.17/com
on/src/rb/lib/selenium/webdriver/driver.rb:44:in `for': unknown driver: :safari (A
gumentError)
from C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/selenium-webdriv
r-0.0.17/common/src/rb/lib/selenium/webdriver.rb:61:in `for'
from C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/watir-webdriver-
.0.1.dev5/lib/watir-webdriver/browser.rb:28:in `initialize'
from use-it.rb:10:in `new'
from use-it.rb:10
2. Use this ruby/watir script:
require "watir-webdriver"
browser = Watir::Browser.new(:safari)
sleep 2
browser.close
3. Then I get this:
C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/selenium-webdriver-0.0.17/com
on/src/rb/lib/selenium/webdriver/driver.rb:44:in `for': unknown driver: :safari (A
gumentError)
from C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/selenium-webdriv
r-0.0.17/common/src/rb/lib/selenium/webdriver.rb:61:in `for'
from C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/watir-webdriver-
.0.1.dev5/lib/watir-webdriver/browser.rb:28:in `initialize'
from use-it.rb:10:in `new'
from use-it.rb:10
Sunday, February 21, 2010
Chapter 55: Watir-Webdriver Journey
- Added "require 'watir/ie' to setup.rb in watir directory and ran core tests.
- Command: ruby core_tests.rb 2>&1 |tee o_watir_core_tests.feb21b
Loaded suite core_tests
Started
.............................................................................................................................................
....................................................................................................................................................
Finished in 206.192 seconds.
289 tests, 1420 assertions, 0 failures, 0 errors
Started
.............................................................................................................................................
....................................................................................................................................................
Finished in 206.192 seconds.
289 tests, 1420 assertions, 0 failures, 0 errors
Monday, February 15, 2010
Chapter 54: Watir-Webdriver Journey
Decide to move "DONE" section from wiki page to this blog so here it is.
DONE:
DONE:
- Dust off GIT. (2/13/2010: done)
- Start using my-Ruby-Journey blog again. (2/13/2010: done)
- Ran waitrspec against watir-webdriver. (2/13/2010: found 59 errors)
- Learn more about watirspec. ("git submodule for projects that
want to implement Watir's API." "specs were taken from Celerity") - http://github.com/jarib/watirspec
- Write watirspec-pending JIRA, then add research (see below): See if rcov works with Rspec (so we can use with watirspec). (2/14/2010: Later found/Already done)
- http://rspec.info/documentation/tools/rcov.html
- http://blog.mhartl.com/2009/05/15/running-rcov-with-rspec/
- http://nullcreations.net/entries/general/enforcing-spec-coverage-with-cruisecontrol-rcov-and-rspec
- http://www.claytonlz.com/index.php/2009/04/how-to-setup-rspec-cucumber-webrat-rcov-and-autotest-on-leopard/
- Read about Rspec, RubySpec, and Guards. (2/14/2010: done)
- Set up Test Env. (2/13/2010: done)
- After playing isolating the filefield_spec.rb spec and getting it to run separately, I decide that the best use of my time was to see if I could get watirspec to run against IE.
- I grep'ed for firefox and found that all I needed to do was set a environment variable, WATIR_WEBDRIVER_BROWSER to either "ie" or "chrome" (not comma!!!).
- I first set the env variable to chrome and got 803 of 807 failures in 27.437 seconds, so I went over to "ie" and ran it and got 151 of 807 in 469.372 seconds (both on Vista/64).
- I will try configuration changes and rerun them. Found this reference regarding running Watir Unit Tests http://wiki.openqa.org/display/WTR/Run+Unit+Tests so I installed activesupport (2.3.5) and found that I already had user-choices (1.1.6.1). Also checked that that active content suggestion was checked under Advanced/ Security setting. Also checked that all new windows open as windows (not tabs) was set.
- Also will try to run tests under Administrator window and still got 153 of 807 in 446.004 seconds. Also got a dialog popup when test suite tried to open a file. Here is the results: http://pastie.org/825967
- Also use this to debug: http://angrez.blogspot.com/2006/12/firewatir-how-to.html
- Tried watir unit tests and got error too. After some study, found a not on "Run Unit Tests" that unit tests were broken with R1.6 watir gem, so stopped.
Subscribe to:
Posts (Atom)