0

Can anyone help me with sample code please. I have to login with SSL client certificate to authenticate in IE, this UI only works in IE. I have this Autoit Script but the popup is not being read by Autoit.

WinWaitActivate (“Request For Permission to Use a Key”)
Send(“{SHIFTUP}{SHIFTUP}{TAB}”)
Send(“password”)
Send(“{ENTER}”)

enter image description here

I have also tried with Java Robot and:

driver.switchTo().window("Request For Permission to Use a Key");
2
  • Is this a modal window? – demouser123 Nov 22 '15 at 6:36
  • yes it is. i do see this error – tjselenium Nov 22 '15 at 17:59
1

Use you browser window name to find the window. Then perform the certificate accept sequence. That should solve your problem.

https://www.autoitscript.com/autoit3/docs/functions.htm

SeleniumTest.java

package tests;

import java.io.IOException;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class Handling_Windows_Based_Prompt {

      public static void main(String[] args) throws IOException{
      WebDriver c1 = new FirefoxDriver();
      c1.get(“http://my.test..in”);
      Runtime.getRuntime().exec(“E:\\authenticationFF.exe”);

     }

 }

    authenticationFF.au3

    WinWaitActive(“Authentication Required”,””,”10″)
    If WinExists(“Authentication Required”) Then
       Send(“CHENNAI/sumand{TAB}”)
       Send(“smartek@1212{ENTER}”)
    EndIf
1
  • Thanks. I believe this popup is not coming from IE. WinWaitActive(“Request For Permission to Use a Key”,””,”10″) If WinExists(“Request For Permission to Use a Key”) Then Send("{SHIFTUP}{SHIFTUP}{TAB}") Send("password") Send("{ENTER}") EndIf – tjselenium Nov 22 '15 at 19:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.