can we put if statement with two condition
if value1=1 and value2=2 then
i put like above but it shows error
You most certainly can do that, yes. I copied the exact code as per your post into a qtp script and it ran without any error. What is the error you message displayed when you tried to run it?
yes but you may want to put it in brackets
If (cond1=1 And cond2 = 2) Then
You don't need brackets if you don't have calculations to be evaluated before the If sataement condtion.
If i=1 and j=1 and k=1 Then
msgbox "Condition is True"
"I realize it's an error, but no one is going to try to do that!"
From "Top 10 Stupid Comments from Developers".
it working fine i did one mistake here if value1=1 and value2=2 then i didn't put space between value=2 and then thats why it shows error
thanks to all