Waitr fails to fire_event for select_list
-----------------------------------------
Key: WTR-485
URL: http://jira.openqa.org/browse/WTR-485
Project: Watir
Issue Type: Bug
Components: Inputs
Affects Versions: 1.8.0
Environment: Windows XP SP3 (64-bit), Internet Explorer 8.0.6001.18702
(32-bit)
Reporter: Michael M
Priority: Major
Watir is able to fire an event for a select list if there are events
of the required type registered to the element. If, however, there are
no objects registered via JavaScript to the select element, then it
fails.
Versions:
Ruby 1.9.2p180
Watir 1.9.1.rc1
HTML Code Sample:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>fire event sample</title>
</head>
<body>
<select name="select">
<option value="1">value1</option>
<option value="2">value2</option>
</select>
</body>
</html>
Ruby Code Sample:
require 'watir'
browser = Watir::Browser.new
browser.goto "http://<path.to>/testPage.html"
browser.select_list(:name, 'select').fire_event('change')
Expected Result:
Code should execute without any errors, firing events if there were
any, and otherwise doing nothing (just like the equivalent behaviour
in JavaScript).
Actual Result:
C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-1.9.1.rc1/lib/watir/
element.rb:339:in `method_missing': (in OLE method `fireEvent': )
(WIN32OLERuntimeError)
OLE error code:80070057 in htmlfile
Invalid argument.
HRESULT error code:0x80020009
Exception occurred.
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-1.9.1.rc1/lib/
watir/element.rb:339:in `dispatch_event'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-1.9.1.rc1/lib/
watir/element.rb:325:in `fire_event'
from IE8FireEventBug.rb:21:in `<main>'
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.openqa.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development