Highlighted
Absent Member.
Absent Member.
313 views

How to make a TruClient script that auto closes the authentication window

I have seen so many authentication related post and none have successfully addressed the issue for me. So Im trying to build a script in which every time it sees the authentication window it closes it. I havent used TruClient that much so this is taking way to long to do and I'm even wondering if it's even possible with this protocol?

Is there a way to do perhaps:

 

if (you find this object){

click its Cancel Button

 

every time you see the object?

0 Likes
2 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: How to make a TruClient script that auto closes the authentication window

Hi PerfTester,

 

If you are using 12.50 you can do that using the new Event Handler for Dialogs

> Define event handler for dialog

> Scope it for relevant steps in which you expect to get the authentication dialog. You can also choose the entire script

> In the handler function add a step from the Toolbox that cicks on the Cancel button. No need in coding. To do that you need to drop a "Generic Browser Action" step. Change the Action from "Navigate" to "Dialog - Autneticate" and change press button from OK to Cancel

 

If you are using an earlier version you will have to use "Catch Error" step after each step in which the dialog might appear. In the catch step call a function in which you click Cancel on the dalog. Unfortuntaetly there is no elegant way, like in 12.50, to handle that

 

Hope it helps

Shlomi

Highlighted
Absent Member.
Absent Member.

Re: How to make a TruClient script that auto closes the authentication window

Thank you very much Shlomi I will try it out. I'm using version 12.01, wasnt aware there was a newer version. Im not used to truclient yet as much as I'm used to http html protocol.

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.