Hello Watir users
I wanted to write the watir-general community and inquire about how
much pain you feel around what appears to be some common items that
might need to be added to watir-webdriver.
1. The underlying selenium-webdriver can not perform an action on an
element if it isn't in the viewable area on the browser. Actions such
as click, text, html, etc on such elements will fail under this
condition.
2. The code for handling alert boxes seams to be very flaky on
certain OS/browser combinations.
3. fire_event('mouseover') doesn't work on all OS/browser combinations
All of these aspects can easily be updated to make your life easier.
Updates to handle each of these aspects are included in qa_robusta,
which has previously been mentioned on the list. If you feel that
these features are valuable, there's a better chance they will get
incorporated into the main release of watir-webdriver if you voice
your opinion.
See https://github.com/ccyphers/qa_robusta/blob/master/qa_observer/lib/watir.rb
for a current implementation to handle these points. Note, personally
I think it might be best to make a slight update to this
implementation, for the element not in the viewable area. All method
calls to Watir::Element which require the element to be in view, could
first:
Watir::Element#scroll_to unless unless Watir::Element#in_viewable_area?
Dealing with alert boxes you would now be able to do something like:
some_element.alert_box.text
some_element.alert_box.dismiss
For mouseovering an element, you no longer would need to call
fire_event, which is unreliable. You could simply:
some_element.mouseover
Thank you for your comments
Cliff.
--
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]