Is this possible? I'd like to add the ability to locate an element based on its "onmouseup" (or onmousedown, onclick, etc...) attribute.
Here is the type of html I'm working with(straight from ".html" in watir): \r\n<TD vAlign=top><DIV style=\"OVERFLOW: auto; WIDTH: 100%; HEIGHT: 435px\">\r\n<TABLE cellSpacing=0 cellPadding=1 border=0>\r\n<TBODY>\r \n<TR>\r\n<TD> </TD>\r\n<TD onmouseup=entityClicked(2437) class=row0 title=\"\">Relationships Test Asset</TD>\r \n<TD> </TD></TR></TBODY></TABLE></DIV></TD> I'd like to be able to do td(:onmouseup,/entityClicked/) and get the td with the onmouse attribute entityClicked(2437). I've already added "td" to my non-control elements list, so I just need to grab the right one. I've tried using td(:html,/(?i)<td onmouseup=.*\/td>/), which matches correctly, but since the outer td is the first one that matches with the regex, and Watir is just looking at the html, not which element actually has the attribute, it gets returned. Alternatively, is there any way to get the farthest-in element that matches? So if I said td(:html,/onmouseup/) it would match the outermost td, then look inside there to see if anything matches, and so on until it reaches a point where nothing else matches other than the element its on? Solutions to either of these problems would help quite a bit if anybody has them. Thanks! -Dylan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to [email protected] Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---
