Jump to content
Sign in to follow this  

When is the right time to launch the script? [newbie question]

Recommended Posts

I am using Selenium to test secure websites requiring smart card authentication.

The security window that pops up requesting the smart card PIN code is a windows object, therefor cannot be handled by Selenium.

I wrote the following AutoIT script which responds to the popup:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
WinWaitActive("Windows Security", "OK")
ControlClick("Windows Security", "OK", "[CLASSNN:Button2]")
WinWaitActive("IDProtect Verification")
WinWaitActive("IDProtect Verification", "Verify")
ControlClick("IDProtect Verification", "Verify", "[CLASSNN:Button2]")

The script works fine when launched manually. Although, I noticed that I need to set focus on the popup in order for it to work.

When I launch from within the application, it does not respond.

I tried execution of the exe before and after launching the tested website, neither with much success.

Any suggestions would be extremely appreciated.



Share this post

Link to post
Share on other sites

Might just be administrative permissions. Run Selenium with admin rights and include #RequireAdmin on the top of your script (just to make sure).

For the activation of the window, instead of:

WinWaitActive("Windows Security", "OK")
WinWait("Windows Security", "OK")
WinActivate("Windows Security", "OK")

So that WinWait waits until the window exists, and you then activate it yourself with WinActivate.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...