Nice one, thanks Brett. I will give it a go. Thanks, Kay
On Sep 2, 6:58 pm, brettsykes <[email protected]> wrote: > Ask Watir for the links collection inside the <div> and then compare > it to an array with your values in it: > > #---------------------- > b = Watir::Browser.new > b.goto 'http://your_site/your_page.html' > > div_links = b.div(:id, 'tools-nav').links > div_links.each { |x| puts x.text } > #---------------------- > > Brett > > On Sep 2, 1:35 pm, Litha K <[email protected]> wrote: > > > > > > > > > Hello all, > > > I have got a test scenario where certain links should appear in a > > particluar order on the page, i.e. > > > 1. Email link appear before Sign Up > > 2. Sign Up link appear before Sign In > > 3. Sign In appears as the last link > > > The HTML is as below: > > > <div id="tools-nav"> > > <ul> > > <li id="email"><a href="https://localhost/email/" id="email-link" > > name="email"><span id="email-text">Email</span></a></li> > > <li id="signup"><a href="https://localhost/signup" name="signup" > > id="login-sign-up">Sign Up</a></li> > > <li id="signin"><a href="https://localhost/signin" name="signin" > > id="login-sign-in">Sign In</a></li> > > </ul> > > </div> > > > Please could someone advise how I could do this in watir-webdriver. > > > Many thanks, > > Kay -- 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]
