>>The problem is that the link above has the same url, but I dont want to
click on the link in that table since it will take me to a dead end.
<<

HUH?  If THE URL IS THE SAME, then how can one link lead you somewhere
the other link does not?   If both links point to the same URL, they
should both take you to the same page, otherwise if they take you
different places, they must have different url's .

The problem appears to be that you are trying to select via a regular
expression, and more than one thing is matching that expression.  Can
you change the regex so it will select one unique link instead of
matching multiple links on the page??

Or another way to consider it, if you were working the page manually,
how would you know which link is the one you want to click, what
identifies it to you visually?

Instead of supplying us with detailed HTML of the table and links you
don't want to select, how about you provide some HTML of the one you
DO want to select?   Perhaps it is inside some other unique container
like a div which could be used to identify it better?

On Aug 25, 7:37 am, Shlomit Gazit <[email protected]> wrote:
> I have this table:
>
> <table id="breadcrumbTable">
> and inside the table I have:
>
> <a onclick="pageTracker._trackEvent('Recently visited', 'Recently visited -
> Issue', '[1482] - 1AIM-issue_name_1');" title="[1482] - 1AIM-issue_name_1"
> href="/c2p/url"><span class="breadcrumb_gray">(Issue) </span>[1482] -
> 1AIM-issue_name_1</a>
>
> I am getting to the link I wish by doing:
>
> ie.link(:url,/url/).click
>
> The problem is that the link above has the same url, but I dont want to
> click on the link in that table since it will take me to a dead end.
>
> Index is not working for me since the table is not static and is growing
> with deletion of items.
>
> This is the entire table if it helps better:
>
> <table id="breadcrumbTable">
>         <tbody><tr>
>             <td class="breadcrumbs" align="left"><h2>Recently
> Visited</h2></td>
>         </tr>
>
>                 <tr>
>             <td class="breadcrumb pt_0 pr_8 pb_10 pl_0"><a
> onclick="pageTracker._trackEvent('Recently visited', 'Recently visited -
> Issue', '[1481] - 1AIM-issue_name_1');" title="[1481] - 1AIM-issue_name_1"
> href="/c2p/topLevelIssueMainView.do?id=7973"><span
> class="breadcrumb_gray">(Issue) </span>[1481] -
> 1AIM-issue_name_1</a><br></td>
>         </tr>
>                 <tr>
>             <td class="breadcrumb pt_0 pr_8 pb_10 pl_0"><a
> onclick="pageTracker._trackEvent('Recently visited', 'Recently visited -
> Issue', '[1482] - 1AIM-issue_name_1');" title="[1482] - 1AIM-issue_name_1"
> href="/c2p/topLevelIssueMainView.do?id=7975"><span
> class="breadcrumb_gray">(Issue) </span>[1482] -
> 1AIM-issue_name_1</a><br></td>
>         </tr>
>                 <tr>
>             <td class="breadcrumb pt_0 pr_8 pb_10 pl_0"><a
> onclick="pageTracker._trackEvent('Recently visited', 'Recently visited -
> List', 'All Issues');" title="All Issues"
> href="/c2p/setDefaultAllIssueList.do"><span class="breadcrumb_gray">(List)
> </span>All Issues</a><br></td>
>         </tr>
>                 <tr>
>             <td class="breadcrumb pt_0 pr_8 pb_10 pl_0"><a
> onclick="pageTracker._trackEvent('Recently visited', 'Recently visited -
> Source', '1Watir-all_1');" title="1Watir-all_1"
> href="/c2p/imperativeMain.do?id=10938"><span
> class="breadcrumb_gray">(Source) </span>1Watir-all_1</a><br></td>
>         </tr>
>                 <tr>
>             <td class="breadcrumb pt_0 pr_8 pb_10 pl_0"><a
> onclick="pageTracker._trackEvent('Recently visited', 'Recently visited -
> List', 'Sources');" title="Sources" href="/c2p/imperativeMainList.do"><span
> class="breadcrumb_gray">(List) </span>Sources</a><br></td>
>         </tr>
>                 <tr>
>             <td class="breadcrumb pt_0 pr_8 pb_10 pl_0"><a
> onclick="pageTracker._trackEvent('Recently visited', 'Recently visited -
> List', 'Projects');" title="Projects" href="/c2p/projectList.do"><span
> class="breadcrumb_gray">(List) </span>Projects</a><br></td>
>         </tr>
>
>     </tbody></table>
>
> 2010/8/25 Željko Filipin <[email protected]>
>
>
>
> > On Tue, Aug 24, 2010 at 11:44 PM, Shlomit Gazit <[email protected]>
> > wrote:
> > > I would like to be able to click on the link that is located outside of
> > the table above.
>
> > Please post sample HTML.
>
> > Željko
> > --
> > watir.com - community manager
> > watirpodcast.com - host
> > testingpodcast.com - audio podcasts on software testing. all of them
> > vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi
>
> > --
> > Before posting, please readhttp://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]<watir-general%2bunsubscr...@goog 
> > legroups.com>

-- 
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]

Reply via email to