Fork me on GitHub

Friday, February 20, 2009

ChromeWatir 1.5.0 Released

I am happy to announce that we have released a new version of ChromeWatir. You can get the gem or source from the project page. We have been working on it for quite sometime and it is me whom you should blame for doing a long spike on Chrome AutomationProxy which I did not complete till now :).

What is new in this release

  • Support for table and file field elements
  • Support for Element Collections like links, images, etc.
  • Refactoring and fixing defects in launcher code.
ChromeWatir is still in alpha but we have got some really good feedback and support make it better. Thanks for everyone who helped and encouraged us.

Now that we are done with the release, I think it is time to start working on C++ code to use AutomationProxy for the next release now ;).

14 comments:

Mariovsky said...

Great Job!!!

when I run the example on the project page, the next error comes up:

c:/ruby/lib/ruby/gems/1.8/gems/chrome_watir-1.5.0/lib/chrome_watir//elements/web_element.rb:58:in `assert_exist': Unable to locate element, using :text, "Advanced Search" (ChromeWatir::Exceptions::UnknownObjectException)
from c:/ruby/lib/ruby/gems/1.8/gems/chrome_watir-1.5.0/lib/chrome_watir//elements/web_element.rb:71:in `assert_enabled'
from c:/ruby/lib/ruby/gems/1.8/gems/chrome_watir-1.5.0/lib/chrome_watir//elements/web_element.rb:92:in `click'
from ejemplo_Inicial_ChromeWatir.rb:5

Sai Venkatakrishnan said...

I think this is a sync issue. I ran the script and it was fine. With every navigation try using wait_for_page_to_load and sync externally. Hope it will help. Let me know if it doesn't work for you.

Regards,
Sai

Mariovsky said...

The problem was I added Chrome to the path because it was required in a previous chrome_watir version.

After I deleted it... sometimes it works fine but sometimes not:

c:/ruby/lib/ruby/gems/1.8/gems/chrome_watir-1.5.0/lib/chrome_watir/container.rb:329:in `wait_for_page_to_load': Navigation timed out. (ChromeWatir::Exceptions::TimeOutException)
from c:/ruby/lib/ruby/gems/1.8/gems/chrome_watir-1.5.0/lib/chrome_watir/browser.rb:13:in `goto'
from ejemplo_Inicial_ChromeWatir.rb:4

Thanks for your work.

Sai Venkatakrishnan said...

I think it must be a synchronization problem. Can you try using browser.wait_for_page_to_load to explicitly synchronizing?

Regards,
Sai

Mariovsky said...

Nothing changes...

My Chrome is 1.0.154.48

Sai Venkatakrishnan said...

Hmm... That shouldn't be happening. The problem I see is that ChromeWatir is not able to connect to the V8 JS remote port. It happens sometimes for me also. That is the reason we are moving to the AutomationProxy of Chrome to make ChromeWatir stabler.

Regards,
Sai

Mariovsky said...

Ok... I'll be waiting for the next version.

You did an amazing work on this version, thanks a lot!!

Sai Venkatakrishnan said...

Thanks dude. I seriously want to move to AutomationProxy for the next version onwards. It may delay things a bit but it will make the core stable.

Regards,
Sai

dave- said...

I got a NameError. What did I do wrong?

I downloaded the chrome_watir gem and installed it. I opened a chrome browser, started irb and got the NameError when I did the require.

C:\Documents and Settings\acct1\My Documents\Downloads>gem install chrome_watir-1.5.0.gem
Successfully installed chrome_watir-1.5.0
1 gem installed
Installing ri documentation for chrome_watir-1.5.0...
Installing RDoc documentation for chrome_watir-1.5.0...

C:\Documents and Settings\acct1\My Documents\Downloads>irb
irb(main):001:0> require "chrome_watir"
NameError: uninitialized constant Windows::API::Error
from c:/Ruby/lib/ruby/gems/1.8/gems/windows-pr-0.9.7/lib/windows/thread.rb:59
from c:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from c:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from c:/Ruby/lib/ruby/gems/1.8/gems/win32-process-0.6.0/lib/win32/process.rb:3
from c:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from c:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from c:/Ruby/lib/ruby/gems/1.8/gems/chrome_watir-1.5.0/lib/chrome_watir.rb:3
from c:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from c:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from (irb):1
irb(main):002:0>

Sai Venkatakrishnan said...

The problem is not with ChromeWatir. This is a general with the windows-pr gem which we are using in the launcher. Please search the Watir forum for the solution.

I think uninstalling and reinstalling this windows-pr gem will help.

sandhya said...

Sai,

I cannot download the chrome-watir gem with the link(http://code.google.com/p/chrome-watir/) that you posted. It gives me 403 Forbidden error. Is there any place that I would be able to download this gem??

Thanks,
Sandy

Sai Venkatakrishnan said...

Hi Sandhya,
The project has moved on to github. The google code version is outdated. Also please check out watir-webdriver. That will give you a stable base for driving chrome...

--Sai

sandhya said...

Sai,

Thanks for the quick reply. Can you pls help me with the correct link that I need to use for getting watir-weddriver. There seems to be some disconnect with the links on Chrome Watir page - http://wiki.openqa.org/display/WTR/ChromeWatir

Thanks.

Godwin said...

Hello Sai,

Can i know what is the correct syntax to install ChromeWatir?

I tried with gem install chrome_watir but i got the following error,
ERROR: could not find gem chrome_watir locally or in a repository

Thanks,
Godwin