04-28-2011, 10:22 PM
Hey guys,
i am new to this board and the whole QTP.
With this code i iterate through links on a website:
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.
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.