Hi,
   I think you are executing wrong sequence of code in If then part or else
part, try this ..

 Window("Windows Internet Explorer").Activate
Browser("Login - CACISISS").Page("Login -
CACISISS").WebList("issuerId").Select DataTable("IssuerId", dtGlobalSheet)
Browser("Login - CACISISS").Page("Login - CACISISS").WebEdit("userId").Set
DataTable("UserId", dtGlobalSheet)
Browser("Login - CACISISS").Page("Login -
CACISISS").WebEdit("password").Set DataTable("Password", dtGlobalSheet)
Browser("Login - CACISISS").Page("Login -
CACISISS").WebButton("Login").Click
If Browser("Login - CACISISS").Page("Login - CACISISS_2").Exist Then
Browser("Welcome to the CACIS Issuing").Page("Welcome to the CACIS
Issuing").Frame("topFrame").
Link("Logout").Check CheckPoint("Logout_2")
Browser("Welcome to the CACIS Issuing").Page("Welcome to the CACIS
Issuing").Frame("topFrame").Link("Logout").Click
Browser("Login - CACISISS").Page("Login - CACISISS").Sync
Browser("Login - CACISISS").Close

Else
Browser("Login - CACISISS").Page("Login - CACISISS_2").WebElement("User Id
is required.Password is required.").Output CheckPoint("User Id is
required.Password is required.")
Browser("Login - CACISISS").Page("Login - CACISISS_2").Sync
Reporter.ReportEvent micFail, "Login Failed", "Incorrect Username or
Password"
Browser("Login - CACISISS").Close
End If



On Tue, May 7, 2013 at 3:18 PM, Geetha <[email protected]> wrote:

>
>  Hi All,
> I tried the below code.
> Simple log in validation
> It always executes the if condition and doesn't go to else part. Hence
> results in error.
>
>   Window("Windows Internet Explorer").Activate
> Browser("Login - CACISISS").Page("Login -
> CACISISS").WebList("issuerId").Select DataTable("IssuerId", dtGlobalSheet)
> Browser("Login - CACISISS").Page("Login - CACISISS").WebEdit("userId").Set
> DataTable("UserId", dtGlobalSheet)
> Browser("Login - CACISISS").Page("Login -
> CACISISS").WebEdit("password").Set DataTable("Password", dtGlobalSheet)
> Browser("Login - CACISISS").Page("Login -
> CACISISS").WebButton("Login").Click
> If Browser("Login - CACISISS").Page("Login - CACISISS_2").Exist Then
> Browser("Login - CACISISS").Page("Login - CACISISS_2").WebElement("User Id
> is required.Password is required.").Output CheckPoint("User Id is
> required.Password is required.")
> Browser("Login - CACISISS").Page("Login - CACISISS_2").Sync
> Reporter.ReportEvent micFail, "Login Failed", "Incorrect Username or
> Password"
> Browser("Login - CACISISS").Close
> Else
>
> Browser("Welcome to the CACIS Issuing").Page("Welcome to the CACIS
> Issuing").Frame("topFrame").Link("Logout").Check CheckPoint("Logout_2")
> Browser("Welcome to the CACIS Issuing").Page("Welcome to the CACIS
> Issuing").Frame("topFrame").Link("Logout").Click
> Browser("Login - CACISISS").Page("Login - CACISISS").Sync
> Browser("Login - CACISISS").Close
> End If
>
>
> Can you please check and tell me why its not exot executing else part
>
>
> Regards,
> Geetha
>
>
>
>
>   --
> --
> 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.
>
>
>



-- 
Akhalesh yadav
+919555717928
+919310680659

-- 
-- 
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.


Reply via email to