[Wtr-general] Attaching to windows problem Inbox *watir
Attebery, Bill
<Bill.Attebery@twtelecom.com> to wtr-general
More options Jun 22
I downloaded the latest dev build (1.5.1.1037) and tried to run a test that was working before – it's now failing to simply attach to a window by title.
I tried attach in irb with the same result.
ie=IE.attach(:title, /SMART/)
where the window title is SMART 2.4
irb(main):003:0> ie=IE.attach(:title, /SMART/)
Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with
title of (?-mix:SMART)
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/./watir.rb:1426:in
`attach_browser_window'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/./watir.rb:1301:in
`attach_init'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/./watir.rb:1294:in
`attach'
from (irb):3
I tried to run the unittests for attach and they also fail with the same type of errors (only a couple examples here):
1) Error:
test_simply_attach_to_new_window(TC_NewWindow):
Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with
title of Pass Page
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/unittests/../watir.rb:1426:i
n `attach_browser_window'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/unittests/../watir.rb:1301:i
n `attach_init'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/unittests/../watir.rb:1294:i
n `attach'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/unittests/attach_to_new_wind
ow_test.rb:21:in `test_simply_attach_to_new_window'
1) Error:
test_existing_window(TC_ExistingWindow):
Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with
title of (?i-mx:buttons)
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/unittests/../watir.rb:1426:i
n `attach_browser_window'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/unittests/../watir.rb:1301:i
n `attach_init'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/unittests/../watir.rb:1294:i
n `attach'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/unittests/attach_to_existing
_window_test.rb:37:in `test_existing_window'
I reverted back to my previous watir version (1.4.1) and attach seems to work fine – is this working for anyone else?
The content contained in this electronic message is not intended to
constitute formation of a contract binding TWTC. TWTC will be
contractually bound only upon execution, by an authorized officer, of
a contract including agreed terms and conditions or by express
application of its tariffs.
This message is intended only for the use of the individual or entity
to which it is addressed. If the reader of this message is not the
intended recipient, or the employee or agent responsible for
delivering the message to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to
the sender of this E-Mail or by telephone.
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
Reply Forward Invite Bill to Gmail
Bret Pettichord
to wtr-general
More options Jun 22
Bill,
Thank you for the report.
This works fine for me. I just ran the window_tests.rb (which includes all the attach tests) in 1.5.1.1037 and everything passed.
There have been a lot of changes in this code in 1.5 and this code is very sensitive to environment.
What version of Windows and Ruby are you using?
Have other people seen problems with IE.attach in 1.5?
Bret
- Show quoted text -
On 6/22/06, Attebery, Bill <Bill.Attebery@twtelecom.com> wrote:
I downloaded the latest dev build (1.5.1.1037) and tried to run a test that was working before – it's now failing to simply attach to a window by title.
I tried attach in irb with the same result.
ie=IE.attach(:title, /SMART/)
where the window title is SMART 2.4
irb(main):003:0> ie=IE.attach(:title, /SMART/)
Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with
title of (?-mix:SMART)
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/./watir.rb:1426:in
`attach_browser_window'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/./watir.rb:1301:in
`attach_init'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/./watir.rb:1294:in
`attach'
from (irb):3
I tried to run the unittests for attach and they also fail with the same type of errors (only a couple examples here):
1) Error:
test_simply_attach_to_new_window(TC_NewWindow):
Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with
title of Pass Page
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/unittests/../watir.rb:1426:i
n `attach_browser_window'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/unittests/../watir.rb:1301:i
n `attach_init'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/unittests/../watir.rb:1294:i
n `attach'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/unittests/attach_to_new_wind
ow_test.rb:21:in `test_simply_attach_to_new_window'
1) Error:
test_existing_window(TC_ExistingWindow):
Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with
title of (?i-mx:buttons)
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/unittests/../watir.rb:1426:i
n `attach_browser_window'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/unittests/../watir.rb:1301:i
n `attach_init'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/unittests/../watir.rb:1294:i
n `attach'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1037/unittests/attach_to_existing
_window_test.rb:37:in `test_existing_window'
I reverted back to my previous watir version (1.4.1) and attach seems to work fine – is this working for anyone else?
The content contained in this electronic message is not intended to
constitute formation of a contract binding TWTC. TWTC will be
contractually bound only upon execution, by an authorized officer, of
a contract including agreed terms and conditions or by express
application of its tariffs.
This message is intended only for the use of the individual or entity
to which it is addressed. If the reader of this message is not the
intended recipient, or the employee or agent responsible for
delivering the message to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to
the sender of this E-Mail or by telephone.
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
Reply Forward
Attebery, Bill
<Bill.Attebery@twtelecom.com> to wtr-general
More options Jun 22
I'm using Windows XP - SP2 – more precisely from About Windows Version 5.1 (Build 2600.xpsp_sp2_gdr.050301-1519 : Service Pack 2)
and
Ruby version: 1.8.2 (I was once under the impression that this was required for watir and haven't had the need to upgrade)
Note:
I had not installed Watir from a gem, obviously when I did it put it in the gems directories.
I had watir files in the C:\ruby\lib\ruby\site_ruby\1.8 directory so I moved the watir.rb and watir folder from here to another location out of my path to make sure it called the right watir files – did I miss anything here by chance?
The error messages refer to watir 1.5 so it seems it's using the correct version.
Just wondering, as I said I haven't done this before.
------------------------------
There have been a lot of changes in this code in 1.5 and this code is very sensitive to environment.
What version of Windows and Ruby are you using?
Bret
- Show quoted text -
The content contained in this electronic message is not intended to
constitute formation of a contract binding TWTC. TWTC will be
contractually bound only upon execution, by an authorized officer, of
a contract including agreed terms and conditions or by express
application of its tariffs.
This message is intended only for the use of the individual or entity
to which it is addressed. If the reader of this message is not the
intended recipient, or the employee or agent responsible for
delivering the message to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to
the sender of this E-Mail or by telephone.
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general