For which action should I use the IF statement? I don't know how to
introduce an IF statement in VB and I am hoping if you could give me
an idea on how to do it. This is my script from Login Action:
Browser("ExxonMobil Authentication").Page("ExxonMobil
Authentication").WebEdit("username").Set DataTable("username",
dtGlobalSheet)
Browser("ExxonMobil Authentication").Page("ExxonMobil
Authentication").WebEdit("password").SetSecure DataTable("pwd",
dtGlobalSheet)
Browser("ExxonMobil Authentication").Page("ExxonMobil
Authentication").WebButton("Login").Click
Browser("ExxonMobil Authentication").Page("Imperial Oil Limited").Sync
The Global Sheet has 2 usernames and passwords: UserA and UserB.
And this is my script for Print Action:
'This action only views the report
Browser("Imperial Oil Limited").Page("Imperial Oil
Limited").Frame("_sweview").Link("Print").Click
Browser("Reports").Page("Reports").WebList("s_0_1_7_0").Select
DataTable("Report_Name", dtLocalSheet)
Browser("Reports").Page("Reports").Link("Run Now").Click
Browser("Reports").Page("Page").Sync
wait(10)
Browser("Reports").Close
Browser("Imperial Oil Limited").Page("Imperial Oil Limited").Sync
I would appreciate if you can tell me how I can put an IF statement to
control the action. I tried using this statement but QTP ignores this
statement and runs normally. Thanks
On Oct 20, 7:19 pm, "David Song" <[EMAIL PROTECTED]> wrote:
> Use VB script, IF ... Then ... Else If ... End If
>
>
>
> On Mon, Oct 20, 2008 at 6:13 PM, Harish <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I have a test with 5 actions starting with "Login" action and ending
> > with "Close" action. The "Login" action is parametrized with 2 id's
> > where QTP can login to the application using these 2 ID's. There is
> > one action in the test that should not be executed when QTP comes to
> > Login ID 2.
>
> > For example, there are two ID's: UserA and UserB and there are 5
> > actions: Login, Sort, Print, Query, Close. UserA can execute all 5
> > actions in the test whereas UserB should not touch the Print action.
> > How do I control this? Any ideas?- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---