yeah except apparently 'abc' here was apparently intended as a generic site 
name not the actual literal American Broadcasting Corp site.. (so he told 
me in mail)

The simple answer is that you can build a collection of links that match a 
specific pattern (expressed as a regular expression), then use ruby methods 
like .each to iterate over the list

  browser.links(:href => /my-test-site.com\/view\?item/).each do |link|
    browser.goto(link.href)
    #what you need to do at that page
  end

If we need to get into more detail, and HTML samples etc, it might be 
better to take this to stack overflow where that stuff can be properly 
formatted, and you can edit your original question to supply the 
information folks need to help you

On Wednesday, June 20, 2012 4:21:14 AM UTC-7, Oscar.Rieken wrote:
>
> word
>
> On Wed, Jun 20, 2012 at 4:12 AM, Chuck van der Linden <[email protected]>wrote:
>
>> Without seeing a sample of the html it's hard to give you an exact 
>> solution.
>> We'll be glad to try and assist you, but there is one sticking point.
>>
>> Disney's terms of use for the ABC site specifically prohibit automated 
>> access of the site
>>
>> "Any business use, "re-mailing" or high-volume or automated use of WDIG 
>> Sites is prohibited."
>>
>> So first of all I'll need some way to know that you have permission, or 
>> are being employed by WDC/ABC to test their site.
>>
>>
>> On Tuesday, June 19, 2012 10:00:21 PM UTC-7, Raghu k wrote:
>>>
>>> Iam writing a script for the following:
>>>
>>> The sequence in the script should be the following:
>>> 1. get the handle from a already open IE window
>>> 2. Check for a link in a page that displys the search results ( assume 
>>> that the IE handle for the windo that was open has search results displayed 
>>> already)that opens a detail page , the link follows the pattern such as 
>>> http://abc.com/view?item=**345618 <http://abc.com/view?item=345618>******. 
>>> The link varies depending on the product , but the starting patter 
>>> http://abc.com/view?item= remains the same. So how do i collect the 
>>> links with the starting pattern so that i can go to the detail product page
>>> 3. Once the detail page is view, again there is a link 
>>> http://abc.com/view?search = pg 1of 10 etc item=345618 ****** i.e it 
>>> goes back to the search page. Once again the pattern is same 
>>> http://abc.com/view?search
>>>
>>> Need this help, any live programs with similar logic would help for a 
>>> quick start. I would prefer doing this in IRB rather than using a script or 
>>> either way is fine.
>>>
>>  -- 
>> 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]
>>
>
>

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