thanks, it helped. On Wednesday, June 29, 2016 at 8:41:38 AM UTC-4, Vikash Mishra wrote: > > Result = dialog().exist() if result =true or false, the next line will be > executed, if there is no condition after this..its a simple logic. > It is not failing because there is no such condition to validate. It just > returning the values. not validating the value.. > > > Tumhare marks agar 40 hai aur tmhare frnd ke 39.9 . Can you say directly > > On Wednesday, June 29, 2016 at 1:30:03 AM UTC+2, [email protected] wrote: >> >> I understand it returns true and false. >> I'm trying to understand why does the following statement prints "Hello >> World" if result1 is false. Shouldn't the script fail if the result1 is >> false and never go to MsgBox."Hello World" >> >> result1 = Dialog("ABC").Exist(9) >> MsgBox "HelloWorld" >> >> >> On Tuesday, June 28, 2016 at 7:37:08 AM UTC-4, [email protected] >> wrote: >> >>> Exist method will return the True or False or Boolean value...If the >>> value is true then the subsequent line of code will be executed, else it >>> will not enter the if loop. result is a variable, and it would be having >>> True or false value. So we have to compare it with Keywords like True or >>> False...see below. >>> >>> Suppose result = .....Exist(10) >>> >>> if lCase(result)=true then // if object exist >>> Do the work **************** >>> End if >>> >>> other then that you can use the default syntax >>> Suppose result = .....Exist(10) >>> >>> if True then >>> ****** >>> end if. >>> >>> try ..if unanswered then pls get back >>> On Tuesday, June 28, 2016 at 2:02:39 AM UTC+2, [email protected] wrote: >>>> >>>> >>>> >>>> Hi, >>>> >>>> result1 = .WinTab("SysTabControl32").Exist (10) >>>> Dialog("ABC').WinTab("SysTabControl32").Select "Host" >>>> >>>> >>>> If we don't' use the If ..Then loop then what's the purpose of >>>> having the result1 = .WinTab("SysTabControl32").Exist (10) statement. >>>> >>>> >>>> Is this the correct way? >>>> >>>> result1 = .WinTab("SysTabControl32").Exist (10) >>>> If result1 Then >>>> Dialog("ABC').WinTab("SysTabControl32").Select "Host" >>>> End If >>>> >>>> >>>> Thanks >>>> >>>> >>>> >>>>
-- -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en --- You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
