Highlighted
Absent Member.
Absent Member.
900 views

How to check if login window is present with TruClient?

Jump to solution

I am about to develop a VUGen script with TruClient (LoadRunner 12.50; Windows 8.1), and I want to be able to check if a login window is present, which is used to log in to some webpage (firefox 43.0.4). The login window looks like this:

 

 

and what I need is to fill something useful in the "if block" step:

 

What is there to put in besides "true" and "false"? How can I check if the login window is still there? Maybe I can define a function which returns "true" or "false" depending on some check? Can I define a TruClient function that returns a value? And how to use that value in the TruClient script then ... ?

 

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: How to check if login window is present with TruClient?

Jump to solution

Hi,

You have two options

1. Add a Dialog - Authenticate step and mark it as optional (See AuthenticateStep.png). To do that you need to drag "Generic Browser Action" step from the Toolbox and change the step action to Dialog - Authenticate. Then mark it as optional

When TruClient will run the script it will try replaying this step but if the dialog does not exists it will just skip to the next step without failing the test

2. Add a Dialog Event Handler (See attached image). Open Event Handler Editor. Add a new handler from type Dialog. Create the function in which there is "Press OK in authentication dialog" step.

When TruClient will run the script it will search for such dialog in the scope you defined in the Event Handler dialog. In case the dialog appears the function you created will be triggered

Good Luck

Shlomi

 

 

 

View solution in original post

4 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: How to check if login window is present with TruClient?

Jump to solution

Hi,

You have two options

1. Add a Dialog - Authenticate step and mark it as optional (See AuthenticateStep.png). To do that you need to drag "Generic Browser Action" step from the Toolbox and change the step action to Dialog - Authenticate. Then mark it as optional

When TruClient will run the script it will try replaying this step but if the dialog does not exists it will just skip to the next step without failing the test

2. Add a Dialog Event Handler (See attached image). Open Event Handler Editor. Add a new handler from type Dialog. Create the function in which there is "Press OK in authentication dialog" step.

When TruClient will run the script it will search for such dialog in the scope you defined in the Event Handler dialog. In case the dialog appears the function you created will be triggered

Good Luck

Shlomi

 

 

 

View solution in original post

Highlighted
Absent Member.
Absent Member.

Re: How to check if login window is present with TruClient?

Jump to solution

Thanks for your help, but where can I find the "Dialog - Authenticate step" and the "Dialog Event Handler" step/function? Are they from the toolbox? Or from somewhere else?

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: How to check if login window is present with TruClient?

Jump to solution

Hi,

Please read my reply carefully and see the screenshots attached. It is explained.

"Dialog - Authenticate" step: drag "Generic Browser Action" step from the Toolbox and change the step action.

"Dialog Event Handler": click on Event Handler button in the toolbar.

Regards,

Shlomi

 

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: How to check if login window is present with TruClient?

Jump to solution

Yes, Shlomi, you are right. I was not reading your email very carefully...

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.