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?

Parents
  • 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

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

Reply Children
No Data