Forum Discussion

shubhangi's avatar
shubhangi
Contributor
13 years ago

"Windows Security" window control

Hi,

I am automating an application that uses security tokens to add users to it.

While adding the user, a window pop up with caption "Windows Security" appears with the list of certificates on tokens to select from.



What is the window class for such windows? I tried using "#32770" without luck.

Any help about handling the "Windows Security" window would be greatly appreciated.



Thanks,

Shubhangi
    • lytran's avatar
      lytran
      New Contributor

       

       

      Can you please give me other solutions or am I missing steps?

       

      Thanks,

      lytran

       

       DirectUIHWND Window Security.png

       DirectUIHWND MSAA.png

  • Hi Mike,



    The window I am dealing with is a standard "Select a Certicate Dialogue".

    I could grab the window handle, however could not select the certificates listed on the page.

    I am seraching for SysListView32 control on the page.



    Regards,

    Shubhangi
  • Attching the snapshot.

    Any help in automating selection of certificates from the list, would be appreciated.



    Thanks

    Shubhangi
  • AlexeyKryuchkov's avatar
    AlexeyKryuchkov
    SmartBear Alumni (Retired)
    Hi Shubhangi,



    The approach I mentioned works for the dialog your image demonstrates as well. Please double-check your project MSAA options.
  • Hi Mike,



    Yes. I did add DirectUIHWND to the OpenApplication|MSAA=>Accepted windows.



    Tried following combinations. None could find the list of the certificates.

    me.LstCerts=Sys.Process("DPInstall").Window("#32770","Windows Security").Window("DirectUIHWND").Window("*ListView*");

    Log.Message(me.LstCerts.wItemCount);

    me.LstCerts=Sys.Process("DPInstall").Window("#32770","Windows Security").Window("DirectUIHWND").Window("*ListBox*");

    Log.Message(me.LstCerts.wItemCount);

    me.LstCerts=Sys.Process("DPInstall").Window("#32770","Windows Security").Window("DirectUIHWND").Window("SysListView32", "FolderView");



    Please correct me I am wrong in accessing the list.



    Thanks,

    Shubhangi
  • Hi,



    Can anyone please share the piece of code for accesing the list of certificates on "Select a certificate" window.

    Snapshot attached in earlier comment.



    I could get the button handles. But could not access the list.



    Regards,

    Shubhangi
  • AlexeyKryuchkov's avatar
    AlexeyKryuchkov
    SmartBear Alumni (Retired)
    Hi Shubhangi,



    On my Windows 7 system, the item from the image attached to my post has the following full name:

    Sys.Process("devenv").Window("#32770", "Windows Security", 1).Pane("Windows Security").ListItem("No certificate available")




    You can try using the Object Spy window to find out the full name in your case.
  • Thanks very much Mike.

    It did solve my problem.

    However I would like to know a bit more about it.

    Why did my code not work for this window? How did you know that there is a Pane, inside the window "Windows security"?

    Becasue I could not find controls in object browser for it.

    Could you please point me to document/link for more information.

    Note: Looks like ObjectSpy link, described in earlier comment doesnot exists.



    Thanks once again,

    Shubhangi
  • AlexeyKryuchkov's avatar
    AlexeyKryuchkov
    SmartBear Alumni (Retired)
    Hi Shubhangi,



    Oh, I'm sorry. I gave a broken link in my previous post. I've edited the link, so now, it works fine. The help topic contains all the information you need.



    As for your code, it looks as if it was created in another version of Windows and cannot work with the Windows Aero version of the dialog.