Priya
I have tried your method but still it deosn't work. But luckily it worked
with "InStr" function. :) Thanks for your inputs
val = Browser("CDMS :: Master Agreement").Page("CDMS :: Master
Agreement").WebElement("html
id:=MainContentPlaceHolder_KeyDocumentInput1_lblSaved").GetROProperty("innertext")
result = InStr(val,"File Uploaded Successfully")
If result > 0 Then
Msgbox "Success"
Else
Msgbox "Fail"
End If
On Saturday, 4 April 2015 13:18:04 UTC-4, priya_rath wrote:
>
> Hi Vidya,
>
> Use the following code to check if the object is hidden or not:
>
> Dim x,y,width,height
> Set wElm = Browser("CDMS :: Master Agreement").Page("CDMS :: Master
> Agreement").WebElement("File Upload successfully")
> x = wElm.GetROProperty("x")
> y = wElm.GetROProperty("y")
> width = wElm.GetROProperty("width")
> height = wElm.GetROProperty("height")
> if wElm.Exist(0)=True Then
> If x=0 And y=0 And width=0 And height=0 Then
> Msgbox "Object Present but Hidden"
> else
> Msgbox "Object Present.Object not Hidden"
> End If
> Else
> Msgbox "Object Not Present"
> End If
>
> Thanks.
>
> On Sat, Apr 4, 2015 at 4:20 PM, vidya Bose <[email protected]
> <javascript:>> wrote:
>
>> Hi Priya, how to check whether object is hidden or not ? kindly advise
>>
>> On Friday, April 3, 2015 at 11:31:48 AM UTC-5, priya_rath wrote:
>>>
>>> Hi,
>>>
>>> The webelement might be hidden and thats why it returns true always.
>>> Check if the webelement is hidden or not. That will solve the issue.
>>>
>>> Thanks
>>> On 3 Apr 2015 17:06, "vidya Bose" <[email protected]> wrote:
>>>
>>>> Hi, I am trying to validate if a webelement property exists on the page
>>>> or not. But QTP always returns true :( and not going to 'Else' part .
>>>> Below
>>>> is my code. pls help to fix this :(
>>>> ************************************************************
>>>> BlnResult = Browser("CDMS :: Master Agreement").Page("CDMS :: Master
>>>> Agreement").WebElement("File Upload successfully").Exist(0) Then
>>>> Msgbox "Success"
>>>> Else
>>>> Msgbox "Fail"
>>>> End If
>>>> ************************************************************
>>>> QTP always returns "success" even in case if web element doesn't exist
>>>> on the page.
>>>>
>>>> --
>>>> --
>>>> 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.
>>>>
>>> --
>> --
>> 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]
>> <javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
--
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.