Hi there, I think this might work for you:
puts @@leftNav.rstrip! This should remove the "\r\n" tags. -George On Oct 20, 9:18 am, Shlomit Gazit <[email protected]> wrote: > watir code: (see above also): > > $ie.link(:text, "#{@@leftNav[i]}").click > > html of the table: > > <table class="tableLeftNav" border="0" cellspacing="0" cellpadding="0" > > <tr> > <td id="impactForm" align="left" height="27" width="1%" > valign="middle" class="pad_0_6_0_6" > > <a href="/c2p/impactImperativeMainList.do?navigationTrail= > %286120%29%28CI%29"><img title="Scope" alt="Scope" name="Scope" src="/ > c2p/images/icons/icon_button_scope.gif" border="0" hspace="0" > onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage > ('Scope','','/c2p/images/icons/icon_button_scope_o.gif',1)"/></a> > </td> > <td width="100%" id="impactForm" class="sectionSelected pad_0" > nowrap="nowrap" valign="middle"> > <a href="/c2p/impactImperativeMainList.do?navigationTrail= > %286120%29%28CI%29" class="leftnav">Scope (0)</a> > </td> > > </tr> > <tr> > <td colspan="2" id="imperativeRequirements" > class="sectionSelected > pad_0"> > <table width="100%" border="0" cellspacing="0" > cellpadding="0"> > <tr> > <td align="right" width="1%" valign="middle" > class="sectionSelected pad_0_6_0_6" > > <a href="/c2p/imperativeRequirementList.do? > navigationTrail=%286120%29%28CI%29"><img title="Sections" > alt="Sections" name="Sections" src="/c2p/images/icons/ > icon_button_sections.gif" border="0" onmouseout="MM_swapImgRestore()" > onmouseover="MM_swapImage('Sections','','/c2p/images/icons/ > icon_button_sections_o.gif',1)" /></a> > </td> > <td nowrap="nowrap" width="100%" height="27" > valign="middle" class="pad_0" > > <a > href="/c2p/imperativeRequirementList.do? > navigationTrail=%286120%29%28CI%29" class="leftnav pad_0">Sections (1) > </a> > </td> > > </tr> > </table> > </td> > > </tr> > <tr> > > <td id="sourceDate" align="left" height="27" width="1%" > valign="middle" class="pad_0_0_0_6" > > <a href="/c2p/sourceDateMainList.do?navigationTrail= > %286120%29%28CI%29"><img title="Dates" alt="Dates" name="Dates" src="/ > c2p/images/icons/icon_button_dates.gif" border="0" > onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage > ('Dates','','/c2p/images/icons/icon_button_dates_o.gif',1)"/></a> > </td> > <td id="sourceDate" width="1%" class="sectionSelected" > nowrap="nowrap" height="27" valign="middle"> > <a href="/c2p/sourceDateMainList.do?navigationTrail= > %286120%29%28CI%29" class="leftnav">Dates (2)</a> > </td> > > </tr> > > On Oct 20, 12:51 am, Željko Filipin <[email protected]> > wrote: > > > > > On Mon, Oct 19, 2009 at 11:48 PM, Shlomit Gazit <[email protected]> > > wrote: > > > > Watir::Exception::UnknownObjectException: Unable to locate element, > > > using :text, "Scope (0) \r\n" > > > Please post html of the table and Watir code that returns this error. > > > > I dont know why it is appending: \r\n, and how to truncate it. > > > Because @@leftNav = $ie.table(:class, "tableLeftNav").innerText returns it. > > > Željko > > --http://watirpodcast.com/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
