Micro Focus QTP (UFT) Forums
Writing an IF statement - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Writing an IF statement (/Thread-Writing-an-IF-statement)



Writing an IF statement - mahadevan.swamy - 10-29-2008

I have a webtable and I want to write an IF statement saying that in row 1, column 10, if the value = "Open", then pop-up a message box saying "OK"

Basically i wrote this line:

Code:
If Browser("Imperial Oil Limited"),Page("Imperial Oil Limited_2").Frame("sweview").WebTable("Select for MultiPay").ChildItem(2,10, "innertext:=Open.*", 0) Then
MSGBOX "OK"
End If
I know this is wrong and I hope you can tell me how to write an IF statement for my problem. Thanks


RE: Writing an IF statement - krishnas.tester - 10-30-2008

Hi,

Code:
If Browser("Imperial Oil Limited"),Page("Imperial Oil Limited_2").Frame("sweview").WebTable("Select for MultiPay").GetCellData(1,10)="Open" Then
MSGBOX "OK"
End If


Regards
KrishDeep