On Tuesday, May 1, 2012 4:58:20 PM UTC-7, chaitanya wrote:
>
> I am trying to run the following sample script in Aptana Studio 3,
>
> require 'watir-webdriver'
>
> b = Watir::Browser.new :firefox
> b.goto("http://www.google.com")
>
> but it produces the error
>
> c:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:172:in `find': unknown
> encoding name - CP0 (ArgumentError)
> from c:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:172:in `initialize'
> from c:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:231:in `exception'
> from c:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:231:in `raise'
> from c:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:231:in `check'
> from c:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:277:in `EnumKey'
> from c:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:551:in `each_key'
> from c:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:566:in `keys'
> from
> c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/firefox/binary.rb:140:in
>
> `block in windows_registry_path'
> from c:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:389:in `open'
> from c:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:496:in `open'
> from
> c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/firefox/binary.rb:139:in
>
> `windows_registry_path'
> from
> c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/firefox/binary.rb:125:in
>
> `windows_path'
> from
> c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/firefox/binary.rb:106:in
>
> `path'
> from
> c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/firefox/binary.rb:49:in
>
> `execute'
> from
> c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/firefox/binary.rb:30:in
>
> `start_with'
> from
> c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/firefox/launcher.rb:68:in
>
> `start_silent_and_wait'
> from
> c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/firefox/launcher.rb:35:in
>
> `block in launch'
> from
> c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/firefox/socket_lock.rb:20:in
>
> `locked'
> from
> c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/firefox/launcher.rb:32:in
>
> `launch'
> from
> c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/firefox/bridge.rb:19:in
>
> `initialize'
> from
> c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/common/driver.rb:31:in
>
> `new'
> from
> c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/common/driver.rb:31:in
>
> `for'
> from
> c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver.rb:63:in
>
> `for'
> from
> c:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.5.6/lib/watir-webdriver/browser.rb:35:in
>
> `initialize'
>
> This script runs fine in netbeans 7.0, from the command line as well.
>
> Here is a shortened list of the gem versions which I am using
> selenium-webdriver (2.21.2)
> watir-webdriver (0.5.6, 0.5.4)
> win32-api (1.4.8 x86-mingw32)
> win32-process (0.6.5)
> windows-api (0.4.1, 0.4.0)
>
> Please let me know if you guys need any other information.
>
>
> Sounds to me a lot like this might be a question for the Aptana folks, if
it works from the command line, but breaks when you try to run it from
their product. Not sure if any of us here use Aptana, most folks that
I've seen that use some kind of IDE seem to favor rubymine
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]