Micro Focus QTP (UFT) Forums
Need help combing code - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Need help combing code (/Thread-Need-help-combing-code)



Need help combing code - mv8167 - 03-06-2012

Since I cant seem to get my Wait Prorerty to work without getting a Warning message, I thought I might try a different aproac.

I need to first wait for the Dialog box to appear or see if I get a Link (moreinfo) indicating that i didnt find data.

I cant seem though to figure out how to combine both of the following:


Code:
If Not Browser("Wisdom").Dialog("File Download").Exist(1) Then
        Do Until Browser("Wisdom").Dialog("File Download").GetROProperty("visible")=True or i = 60
        i=i+1
        Loop
End If

If Not Browser("Wisdom").Dialog("File Download").Exist(1) Then
    Do until Not Browser("Wisdom").Page("Wisdom IA").Frame("parent").Link("MoreInfo").Exist(0) or i=10       ' Checking this for 10 times for data.
        With Browser("Wisdom").Page("Wisdom IA").Frame("parent")
            .Link("MoreInfo").Click
            .Link("here").Click
                If .Link("name:="& ReportName, "Visible:=True", "abs_x:="& absX, "abs_y:="& absY).Exist(0) Then
                    Call GoBackToReportName (ReportName, absX, absY)
                Else
                    Call GoBackToGroupNameReportName (GroupName, ReportName, absX, absY)
                End If
                i=i+1
        End with
    Loop
End If


Can anyone help me combine these two If statements into one that does both "If"s ?