In the HTML, there are lot of aref. I want to pick the aref that
resemebles like <a href="/profile/view?
id=22891337&authType=OUT_OF_NETWORK&authToken=ORDn&locale=en_US&srchid=6e3c80af-
fbc3-4c2c-a48a-314e65440c91-0&srchindex=3&srchtotal=290438&goback=

How do i pick the particulare aref from the code?

On Apr 24, 2:53 am, Chuck van der Linden <[email protected]> wrote:
> I don't have html for your site, but if there is some predictable container
> such as a div with an id like 'results'  then you could do something like
> this  (also presumes the only links inside the results are to actual
> results, and not things like upvotes etc.. in that case you may need to be
> more stringent in identifying the link to be clicked, for guidence there we
> would HAVE to see sampleHTML. )
>
>  do your search
>  10.times do |i|
>     browser.div(:id => 'results).link(:index => i).click
>      (whatever you need to do with the resulting page if anything)
>    browser.back
>   end
>
> If you need to do more than the first page of results, then wrap that loop
> in something that clicks the 'next page' link as many times as you need to.
>
> Note: unless you work for the company that makes the site, please be sure
> to check their terms of service, many of them forbid automated access,
> especially link scraping etc) without prior written permission, or restrict
> such access to authorized users of their API and demand it be done via the
> api.
>
>
>
> On Monday, April 23, 2012 6:51:57 AM UTC-7, Željko Filipin wrote:
>
> > On Sat, Apr 21, 2012 at 10:42 PM, Raghu k <[email protected]> wrote:
> > > Something like ths would help .. Please help me with a quick code...
>
> > Is there a problem with the code you have posted?
>
> > Željko
> > --
> > watir.com/book - author- Hide quoted text -
>
> - Show quoted text -

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

Reply via email to