Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Itereate through Link Items
#1
Solved: 11 Years, 3 Months, 1 Week ago
Hey guys,

i am new to this board and the whole QTP.

With this code i iterate through links on a website:

Code:
i=0
j=1
While Browser("IDD Portal Login").Page("IDD Portal").Frame("frameLeft").Link("class:=arrow_normal", "html tag:=A", "index:="&i).Exists = true

    Datatable.SetCurrentRow (i+1)
    Browser("IDD Portal Login").Page("IDD Portal").Frame("frameLeft").Link("class:=arrow_normal", "html tag:=A", "index:="&i).Click
    i = i+1
    Wait 2

    While Browser("IDD Portal Login").Page("IDD Portal").Frame("frameMain").Link("class:=arrow_bold", "html tag:=A", "index:="&j).Exists = true

        txt = Browser("IDD Portal Login").Page("IDD Portal").Frame("frameMain").Link("class:=arrow_bold", "html tag:=A", "index:="&j).GetRoProperty("innertext")

        If txt <> "Instanz auswählen" Then
            print txt
            Datatable("Berichtstitel", dtGlobalsheet) = txt
        End If

        j = j+1
        
    Wend
    
Wend
Datatable.ExportSheet "D:\Daten\Berichtsl.xls", 1

As u may know now, the parser dont accept this, because the function EXISTS is not possible to use in that context.

Now i ask you, how i can define an end of my ieration? The count of iteration has to be variable. Anyone has an idea?

thanks in advance, lucster.
Reply


Messages In This Thread
Itereate through Link Items - by lucster - 04-28-2011, 10:22 PM
RE: Itereate through Link Items - by vIns - 04-29-2011, 10:53 AM
RE: Itereate through Link Items - by lucster - 04-29-2011, 05:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT] [WPF] DataGrid: get items of ControlTemplate robertosalemi 0 3,466 07-14-2016, 07:52 PM
Last Post: robertosalemi
  SwfList: unchecked all items robertosalemi 0 1,939 12-21-2015, 03:46 PM
Last Post: robertosalemi
  Select Menu items shilpaS 1 7,050 06-19-2015, 01:23 AM
Last Post: supputuri
  Object Spy not detecting items in C ICL AndyBSG 5 4,312 11-28-2014, 09:32 PM
Last Post: AndyBSG
  to verify the presence of items in wpf application Priyanka2 0 2,410 10-10-2013, 03:52 PM
Last Post: Priyanka2

Forum Jump:


Users browsing this thread: 1 Guest(s)