On Aug 25, 1:44 pm, Shlomit Gazit <[email protected]> wrote: > I will give you exact examples: > > I want to click on this html tag: > > <a href="/c2p/imperativeMain.do?navTrailRequired=false&id=1" > class="linkList" onmouseover="TagToTip('ID_SPAN_CONTEXT_NOTE__1', WIDTH, > -240, SHADOW, true, BORDERCOLOR, '#e9e1c5', FONTCOLOR, '#000099', BGCOLOR, > '#ffffc0', STICKY, true, FONTFACE, 'verdana, arial, helvetica', FONTSIZE, > '11px', CLICKCLOSE, true);" onmouseout="UnTip();">Source: <font > class="supporting">[Pending] </font><b>SS very long name imperative </b></a> > > The link that will lead me to a dead end its html is: > > <a onclick="pageTracker._trackEvent('Recently visited', 'Recently visited - > Source', 'be<script>alert(" c...');"="" title="be<script>alert(" > copy")<="" script>?"="" > href="/c2p/imperativeMain.do?navTrailRequired=false&id=262"><span > class="breadcrumb_gray">(Source) </span>be<script>alert("C...</a> > > For clicking on each of them I will do with watir: > > ie.link(:url,/imperativeMain.*do.*?navTrailRequired=/).click
Unless I'm mis-reading, the first link has Class="linkList", and the second one has no class defined. SO why not just select according to class & url instead of URL alone? ie.link(:class => "linkList", :url => /imperativeMain.*do.*? navTrailRequired=/).click Alternatively, it does look to me like the text displayed for each link is slightly different.. so I'm wondering if selecting via some portion of the link text might also work. Also just to be clear, you don't have HTML ID's in there at all. The only ID values I see are unique to your website code and are a part of the URL querystring, not HTML tag attributes. So all the discussion of selecting by ID etc is pretty much a moot point -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: [email protected] To unsubscribe: [email protected]
