Thank you Udayanem!!
On Wednesday, August 14, 2013 12:09:06 PM UTC-4, udayanem wrote:
>
> Hi,
>
> I hope you misunderstand the entire concept here.
>
> I am hoping you want to check the existence on an image. If that is
> correct, the correct approach is
>
> Set des=description.Create
> des("micclass").value="Image"
> des("file name").value="tagline2.png"
> Set obj=browser("title:=.*").page("title:=.*").image(des)
> if obj.exist then
> msgbox "Pass"
> else
> msgbox "Fail"
> end if
>
> On Wednesday, 14 August 2013 20:10:24 UTC+5:30, [email protected]:
>>
>> When i run the code it gives an error
>>
>>
>> "The test run cannot continue due to a syntax error.
>>
>> Expected 'Then'
>>
>> Line (1): "If file name"tagline2.png".exist Then". "
>>
>> Set des=description.Create
>> des("micclass").value="Image"
>> des("file name").value="tagline2.png"
>> Set obj=browser("title:=.*").page("title:=.*").ChildObjects(des)
>> msgbox obj.count
>> If file name"tagline2.png".exist Then 'Here file name is two words, that
>> is the reason you are getting error at If condition.
>> msgbox "Pass"
>> else
>> msgbox "fail"
>> End If
>>
>>
--
--
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/groups/opt_out.