History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WTR-120
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Kingsley Hendrickse
Reporter: Zeljko
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Watir

autoit not installed if limited user installs watir

Created: 15/Dec/06 06:01 AM   Updated: 10/Jun/08 12:50 PM
Component/s: Gem installer
Affects Version/s: 1.5.0/1.5.1
Fix Version/s: Future

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: watir-1.5.1.1127.gem


 Description  « Hide
Install watir as limited user. send_keys_test.rb fails

C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.1.1127\unittests>send_keys_test.rb
Loaded suite C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/send_keys_test
Started
FEE
Finished in 1.515 seconds.

  1) Failure:
test_autoregistration(TC_Fields) [C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/send_keys_test.rb:31]:
Exception raised:
Class: <WIN32OLERuntimeError>
Message: <"Unknown OLE server: `AutoItX3.Control'\n HRESULT error code:0x800401f3\n Invalid class string">
---Backtrace---
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/../watir.rb:4356:in `initialize'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/../watir.rb:4356:in `new'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/../watir.rb:4356:in `autoit'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127 /unittests/../watir.rb:1644:in `autoit'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/../watir.rb:1652:in `send_keys'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/send_keys_test.rb:31:in `test_autoregistration'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/send_keys_test.rb:31:in `test_autoregistration'
---------------

  2) Error:
test_enter(TC_Fields):
WIN32OLERuntimeError: Unknown OLE server: `AutoItX3.Control'
    HRESULT error code:0x800401f3
      Invalid class string
    C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/../watir.rb:4356:in `initialize'
    C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/../watir.rb:4356:in `new'
    C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/../watir.rb:4356:in `autoit'
    C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/../watir.rb:1644:in `autoit'
    C:/ruby/lib/ruby/gems/1.8/gems/watir- 1.5.1.1127/unittests/../watir.rb:1652:in `send_keys'
    C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/send_keys_test.rb:23:in `test_enter'

  3) Error:
test_tabbing(TC_Fields):
WIN32OLERuntimeError: Unknown OLE server: `AutoItX3.Control'
    HRESULT error code:0x800401f3
      Invalid class string
    C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/../watir.rb:4356:in `initialize'
    C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/../watir.rb:4356:in `new'
    C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/../watir.rb:4356:in `autoit'
    C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/../watir.rb:1644:in `autoit'
    C:/ruby/lib/ruby/gems/1.8/gems/watir- 1.5.1.1127/unittests/../watir.rb:1652:in `send_keys'
    C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/send_keys_test.rb:16:in `test_tabbing'

3 tests, 2 assertions, 1 failures, 2 errors

Uninstall watir, then install it as administrator. send_keys_test.rb passes. Run send_keys_test.rb as limited user and it fails.

C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.1.1127\unittests>send_keys_test.rb
Loaded suite C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/send_keys_test
Started
FF.
Finished in 2.562 seconds.

  1) Failure:
test_autoregistration(TC_Fields) [C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/send_keys_test.rb:30]:
<WIN32OLERuntimeError> exception expected but none was thrown.

  2) Failure:
test_enter(TC_Fields) [C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/unittests/send_keys_test.rb:25]:
<false> is not true.

3 tests, 3 assertions, 2 failures, 0 errors

 All   Comments   Work Log   Change History      Sort Order:
Bret Pettichord - 19/Dec/06 07:46 PM
Kingsley plans to remove autoit, which will resolve this issue.

Bret Pettichord - 28/Jan/07 12:24 AM
The problem is that in 1.5.x, autoit is auto-registered on first use. But this requires admin privileges. We need to provide a post-install script that would register autoit and then tell people to run this script as admin.

Bret

Bret Pettichord - 10/Jun/08 12:50 PM
Another workaround would be simply to install autoit directly (instead of depending on watir to install it).