Hi Shantanu,

Thank you for your reply. I tried but still the same. I noticed another
one....

When it tries
UN                     Pwd                      Error msg
1. valid id            Empty                   Invalid username and pwd
2. Empty            Valid                     Invalid username and pwd
3. Valid id           Valid pwd              Copyright 2014
4. Valid id           Valid pwd              Copyright 2014

For 3 and 4 it wait in that page for some time and captures copyright 2014
in the error msg....

Anything wrong in my script?

If Browser("Site").Page("Site_7").WebElement("Invalid username or password.
Signon failed.").Exist(20)

If i click on this line currently i see blank screen, there is page shown
in the active screen for this line. Is that a problem?

Please help if anyone encounter the same issue.

Regards,
Geetha







On Tue, Jul 22, 2014 at 7:04 PM, Shantanu Jain <[email protected]>
wrote:

> Hi Geetha,
> Try Using Sync or Wait function before this line. As the QTP execute
> script very fast and it is unable to find that window in that short time.
>
> Also, you can use .exist(20) instead of wait.
>
> If Browser("Site").Page("Site_7").WebElement("Invalid username or
> password. Signon failed.").Exist(20)
>
>
> On Tue, Jul 22, 2014 at 3:17 PM, Shine Ever <[email protected]>
> wrote:
>
>> Hi Manoj /Prasad,
>>
>>  Thank you for your reply.']
>>
>> I tried but still the same.
>>
>> The inputs:
>> UN                     Pwd
>> 1. valid id            Empty
>> 2. Empty            Valid
>> 3. Valid id           Valid pwd
>> 4. Valid id           Valid pwd
>>
>> It execute the first 2 cases correctly and I am able to get the correct
>> result.
>>
>> The 3 and 4 cases instead of going to else condition it still checks the
>> if condition unable to find the object property and show failed in the
>> result.
>>
>> Also i found:
>> If Browser("Site").Page("Site_7").WebElement("Invalid username or
>> password. Signon failed.").Exist -> For this line there is no active screen
>> would that be a reason??
>> If so how should I get it?
>>
>> Regards
>> Geetha
>>
>>
>>
>> On Sat, Jul 19, 2014 at 9:04 AM, Prasad.L.V <[email protected]> wrote:
>>
>>> use
>>> .Exist(0)
>>>
>>>
>>>
>>>
>>> On 18 July 2014 15:09, Manoj Gupta <[email protected]> wrote:
>>>
>>>> Try this
>>>>
>>>> Browser("Site").Page("Site").WebEdit("userId").Set
>>>> DataTable("username", dtGlobalSheet)
>>>>
>>>> Browser("Site").Page("Site").WebEdit("password").Set
>>>> DataTable("password", dtGlobalSheet)
>>>>
>>>> Browser("Site").Page("Site").WebButton("Login").Click
>>>>
>>>> If Browser("Site").Page("Site_7").WebElement("Invalid username or
>>>> password. Signon failed.").Exist(10) Then
>>>>
>>>> Browser("Site").Page("Site_7").WebElement("Invalid username or
>>>> password. Signon failed.").Output CheckPoint("Invalid username or password.
>>>> Signon failed._2")
>>>>
>>>> Browser("Site").Page("Site").Sync
>>>>
>>>> Browser("Site").Close
>>>>
>>>> Reporter.ReportEvent micFail,"Login failed","Incorrect username and
>>>> password"
>>>>
>>>> Else
>>>>
>>>> Browser("Site").Page("Site_6").Link("Logout").Click
>>>>
>>>> Browser("Site").Page("Site").Sync
>>>>
>>>> Browser("Site").Close
>>>>
>>>> Reporter.ReportEvent micPass,"WEbpage is seen","Pass"
>>>>
>>>> End If
>>>> On Jul 18, 2014 2:00 PM, "Geetha" <[email protected]> wrote:
>>>>
>>>>> Hi,
>>>>> Below is the code .. Please correct me if I am wrong
>>>>>
>>>>>
>>>>> Browser("Site").Page("Site").WebEdit("userId").Set
>>>>> DataTable("username", dtGlobalSheet)
>>>>>
>>>>> Browser("Site").Page("Site").WebEdit("password").Set
>>>>> DataTable("password", dtGlobalSheet)
>>>>>
>>>>> Browser("Site").Page("Site").WebButton("Login").Click
>>>>>
>>>>> If Browser("Site").Page("Site_7").WebElement("Invalid username or
>>>>> password. Signon failed.").Exist Then
>>>>>
>>>>> Browser("Site").Page("Site_7").WebElement("Invalid username or
>>>>> password. Signon failed.").Output CheckPoint("Invalid username or 
>>>>> password.
>>>>> Signon failed._2")
>>>>>
>>>>> Browser("Site").Page("Site").Sync
>>>>>
>>>>> Browser("Site").Close
>>>>>
>>>>> Reporter.ReportEvent micFail,"Login failed","Incorrect username and
>>>>> password"
>>>>>
>>>>> Else
>>>>>
>>>>> Browser("Site").Page("Site_6").Link("Logout").Click
>>>>>
>>>>> Browser("Site").Page("Site").Sync
>>>>>
>>>>> Browser("Site").Close
>>>>>
>>>>> Reporter.ReportEvent micPass,"WEbpage is seen","Pass"
>>>>>
>>>>> End If
>>>>>
>>>>>
>>>>> Regards,
>>>>> Geetha
>>>>>
>>>>> On Jul 18, 2014, at 11:43 AM, Geetha <[email protected]> wrote:
>>>>>
>>>>> *This message has no content.*
>>>>>
>>>>>  --
>>>>> --
>>>>> 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]
>>>> 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]
>>> 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]
>> 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.
>>
>
>
>
> --
>
> Thanks and regards
> Shantanu Jain
> Cell: +91 9611133087
>
>  --
> --
> 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]
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.

Reply via email to