Watir IE8 compatible?

81 views
Skip to first unread message

juuser

unread,
Aug 13, 2008, 8:14:58 AM8/13/08
to Watir General
Hello.

We tried to install IE8 Beta 1 and run with Watir, but it seems to
have some problems. Is IE8 compatible with Watir or just not yet?

Everything seems to be working, except when trying to get row from
table.

For example, we have something like this:

t = @b.table(:id, "blahblah")

row = t[0] <---- this line fails!

it gets win32ole error:
rows
OLE error code:8000FFFF in htmlfile
Unexpected call to method or property access.
HRESULT error code:0x80020009
Exception occurred.

Any ideas what might cause this?

Tried to run some sample code against google, but used table(:index,
1) instead and this worked.

juuser

unread,
Aug 13, 2008, 8:31:21 AM8/13/08
to Watir General
It seems that Selenium users are getting something similar
http://clearspace.openqa.org/message/47070

Bret Pettichord

unread,
Aug 13, 2008, 10:29:58 AM8/13/08
to watir-...@googlegroups.com
juuser wrote:
> It seems that Selenium users are getting something similar
> http://clearspace.openqa.org/message/47070
Please continue to let us know about issues you find with IE8. Did you
run the core_tests.rb unit tests?

Bret

Peter

unread,
Aug 13, 2008, 3:34:20 PM8/13/08
to Watir General
Does row = t[1] work? Tables are indexed starting with 1 from what I
remember.

juuser

unread,
Aug 14, 2008, 7:05:37 AM8/14/08
to Watir General
Sorry for this minor confusion. I didn't actually try with 0, but with
some other index directly from our spec.

Anyway, running core_tests failed with only 1 test and that didn't
seem to be anything critical, at least not for my tests:
1) Failure:
test_form_html(TC_Forms2) [C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/
unittests/../unittests/form_test.rb:38]:
<"\r\n<FORM id=f2 name=test2 action=pass2.html method=get><BR><INPUT
type=submit value=Submit> </FORM>"> expected but was
<"\r\n<FORM id=f2 method=get name=test2 action=pass2.html><BR><INPUT
value=Submit type=submit> </FORM>">.

226 tests, 1145 assertions, 1 failures, 0 errors

also tried to run table_test and it passed 100%.

Anywhere, here is my helper method, which fails:
def get_cell(table, row, col=nil)
table = table(table) unless table.class == Watir::Table

begin
puts "we are here, #{row}, #{col}"
p table
if col != nil
puts "we are not here"
cell = table[row][col]
else
puts "and here"
cell = table[row]
puts "didn't get any cell!"
end
return cell
rescue => e
puts "exception:"
p e
exit
raise "cell or row at row #{row} and col #{col} was not found
from the table"
end
end

and here is the output, which i get from my spec:

we are here, 2,

#<Watir::Table:0x51633e8 @o=#<WIN32OLE:0x5150f54>,
@page_container=#<Watir::IE:0x517d0a4 @page_container=#<Watir::IE:
0x517d0a
4 ...>, @type_keys=true, @down_load_time=0.212, @ole_object=nil,
@typingspeed=0, @process_id=4152, @rexmlDomobject=nil, @spee
d=:fast, @ie=#<WIN32OLE:0x517b114>, @url_list=["about:blank", "https://
localhost/"], @logger=#<Watir::DefaultLogger:0x517b010
@default_formatter=#<Logger::Formatter:0x517ade0
@datetime_format=nil>, @progname=nil, @logdev=#<Logger::LogDevice:
0x517ad68 @filename=nil, @shift_age=nil, @mute
x=#<Logger::LogDevice::LogDeviceMutex:0x517afd4
@mon_entering_queue=[], @mon_count=0, @mon_owner=nil,
@mon_waiting_queue=[]>,
@dev=#<IO:0x3626ad0>, @shift_size=nil>, @level=2,
@formatter=#<Logger::SimpleFormatter:0x517aaac @datetime_format="%d-%b-
%Y
%H:%M:%S">>, @activeObjectHighLightColor="yellow",
@pause_after_wait=0.01, @error_checkers=[]>, @container=#<Watir::IE:
0x517d
0a4 @page_container=#<Watir::IE:0x517d0a4 ...>, @type_keys=true,
@down_load_time=0.212, @ole_object=nil, @typingspeed=0, @pro
cess_id=4152, @rexmlDomobject=nil, @speed=:fast, @ie=#<WIN32OLE:
0x517b114>, @url_list=["about:blank", "https://localhost/"],
@logger=#<Watir::DefaultLogger:0x517b
010 @default_formatter=#<Logger::Formatter:0x517ade0
@datetime_format=nil>, @progname=nil, @logdev=#<Logger::LogDevice:
0x517a
d68 @filename=nil, @shift_age=nil,
@mutex=#<Logger::LogDevice::LogDeviceMutex:0x517afd4
@mon_entering_queue=[], @mon_count=0,
@mon_owner=nil, @mon_waiting_queue=[]>, @dev=#<IO:0x3626ad0>,
@shift_size=nil>, @level=2, @formatter=#<Logger::SimpleFormatt
er:0x517aaac @datetime_format="%d-%b-%Y %H:%M:%S">>,
@activeObjectHighLightColor="yellow", @pause_after_wait=0.01,
@error_che
ckers=[]>, @what="tblTemp", @original_color=nil, @how=:id>

and here
exception:
#<WIN32OLERuntimeError: rows
OLE error code:8000FFFF in htmlfile
Unexpected call to method or property access.
HRESULT error code:0x80020009
Exception occurred.>


so, the exception comes from line "cell = table[row]"

This means that majority of my tests are failing.

BUT I noticed that IE8 has this button "Emulate IE7" and with that
enabled, this part doesn't fail (but I haven't checked all my tests,
just ran small amount, which failed before). Anyway, I should give it
a try.

This "Emulate IE7" didn't make core_tests to pass although (failed
with same test).

Anyway, let's bear in mind that this is still Beta 1, so don't know.
But why I wanted to give IE8 try? That's because i'm tired of this "1
item remaining" problem, which occurs quite often, but no-one doesn't
seem to be able to locate the problem. So I thought that maybe IE8 has
this problem fixed. Can't say so far, haven't ran it enough times yet,
hehe. And hopefully this "Emulate IE7" doesn't emulate IE7 bugs too.

Anyway, if anyone has any ideas what might cause that problem or any
solutions to propose, let me know.

Thank you!

I'll also let you know if I don't encounter any "1 item remaining"
problems. It has some hope because IE8 should have newer JavaScript
engine and maybe it works better, hehe.

Also, I'm going to let Watir to run all it's unit tests during night
(although I didn't do it with IE7).

juuser

unread,
Aug 15, 2008, 2:19:09 AM8/15/08
to Watir General
Okay, here are the results for all_tests.rb. I have to say that I had
to click few times Ok and Cancel myself on JS popup windows, because
it wasn't clicked automatically or at least it seemed so, because I
waited some time. Anyway, some of the popup(s) didn't appear at all.
Anyway, here are the results. Cannot say at the moment that results
would be different on my machine if IE7 would be installed. Also,
"Emulate IE7" mode was disabled. Doesn't seem too bad.

Finished in 307.78 seconds.

1) Error:
test_alert_without_bonus_script(TC_Dialog_Test):
Watir::Exception::UnknownObjectException:
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/unittests/../watir/
dialog.rb:38:in `click'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/unittests/../unittests/
dialog_test.rb:25:in `test_alert_without_bonus_script'

2) Error:
test_button_name_not_found(TC_Dialog_Test):
Watir::Exception::UnknownObjectException:
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/unittests/../watir/
dialog.rb:38:in `click'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/unittests/../unittests/
dialog_test.rb:33:in `test_button_name_not_found'

3) Failure:
test_confirm_ok(TC_Dialog_Test) [C:/ruby/lib/ruby/gems/1.8/gems/
watir-1.5.6/unittests/../unittests/dialog_test.rb:61]:
<false> is not true.

4) Failure:
test_form_html(TC_Forms2) [C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/
unittests/../unittests/form_test.rb:38]:
<"\r\n<FORM id=f2 name=test2 action=pass2.html method=get><BR><INPUT
type=submit value=Submit> </FORM>"> expected but was
<"\r\n<FORM id=f2 method=get name=test2 action=pass2.html><BR><INPUT
value=Submit type=submit> </FORM>">.

5) Error:
test_save_local_image(TC_Images):
Errno::ENOENT: No such file or directory - C:/ruby/lib/ruby/gems/1.8/
gems/watir-1.5.6/unittests/sample.img.dat
c:/ruby/lib/ruby/1.8/ftools.rb:133:in `stat'
c:/ruby/lib/ruby/1.8/ftools.rb:133:in `compare'
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.6/unittests/../unittests/
images_test.rb:141:in `test_save_local_image'

324 tests, 1569 assertions, 2 failures, 3 errors



Trevor

unread,
Sep 12, 2008, 9:09:37 AM9/12/08
to Watir General
Hi,
I had similar problems with Tables in IE8
However, I have just downloaded the Beta2 release, and this works fine
with my tests.

Trevor

juuser

unread,
Sep 16, 2008, 9:04:22 AM9/16/08
to Watir General
Yup. I've forgot to post here that IE8 is OK and I weren't able to
find any "emulate IE7" buttons anywhere.
Reply all
Reply to author
Forward
0 new messages