Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Drill down through the catalog
#1
Not Solved
Hi,
I have following problem:

I need to drill down through the catalog via all links.
Catalog has 4 levels and each level has few links.
I'm grabbing all links on the page then following each via 'Foreach' loop. But after I'm comming back I'm not able to following next one.

Can anybody correct my procedure?


Code:
Sub DrillDown (url, level, urlback)
   If level =1 Then
        SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe","","u:\","open"
        Browser("IE7").Page("Page").Sync
        Browser("IE7").Navigate url
        Browser("IE7").Page("Page").Sync
    
        Dim objNames
        Dim objName
        Dim blnFound
   End If

    If Browser("IE7").Page("Result").WebElement("div").Exist(2)Then
        level = 4
    End If
  
    If level=1 Then
        Set objNames = Browser("IE7").Page("TGRMain").WebTable("CategoriesGrid").Object.getElementsByTagName("A")
        col = Level1
    Elseif level = 2 Then
        Set objNames = Browser("IE7").Page("Groups").WebTable("CategoriesGrid").Object.GetElementsByTagName("A")    
        col = Level2
    Elseif level = 3 Then
        Set objNames = Browser("IE7").Page("Headings").WebTable("CategoriesGrid").Object.GetElementsByTagName("A")  
        col = Level3
    End If

blnFound = False
lngCellCount = 0

If level <> 4 Then
  For Each objName in objNames
    If level = 1 or level = 2 or level = 3 Then
      bu =  Browser("IE7").GetROProperty("URL")
      objName.Click()
      Browser("IE7").Sync
      Call DrillDown(domain, level+1, bu)
    End if
  Next 'objName
Else
  Browser("IE7").Navigate urlback
  Browser("IE7").Page("Page").Sync
End If
    
End Sub


Thank you
Reply


Messages In This Thread
Drill down through the catalog - by nuher - 06-05-2009, 05:12 PM
RE: Drill down through the catalog - by guocnc - 06-09-2009, 07:19 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question Initial Catalog;Package Collection DB2 Charanpreet 0 3,146 05-06-2011, 03:56 PM
Last Post: Charanpreet

Forum Jump:


Users browsing this thread: 1 Guest(s)