0

I have encountered with the below scenario https://ipay.adp.com/iPay/login.jsf Clicking on the login button in the page, I am getting pop up window which i am unable to handle. Could any one help me in resolving this scenario..

Pavan Kumar
  • 203
  • 2
  • 3
  • 7

2 Answers2

0

You can use autoit to automate the popup.

See:

And then you can you can call the exe file using java

    //click on the login button
    Process process= Runtime.getRuntime().exec("C:\\Documents and Settings\\new.exe"); // Give  path where the exe is saved.
    process.waitFor();
    process.destroy();
scytale
  • 12,346
  • 3
  • 32
  • 46
Programmer
  • 455
  • 5
  • 18
0

please perform following steps :
1. Download AutoIT tool. It can be downloaded from http://www.autoitscript.com/site/autoit/downloads/

Note: Please download AutoIT Full Installation

  1. While installing AutoIT, you will get two options: Run the Script and Edit the Script. If you are going to use the script without any modification, choose Run the Script option. If you want to customize the scripts, choose Edit the Script option (Recommended as we always needs to customize the scripts for our needs. Sometimes we need to create our own scripts.)
  2. Open the place where auto it is installed
  3. Open "Extras Folder" and then "Au3Record" For X-86 use this path C:\Program Files (x86)\AutoIt3\Extras\Au3Record
  4. Open Recorder wait for it to launch
  5. In browser perform steps to show that window
  6. Now Click Record button on Recorder
  7. Perform Key sequence by keyboard which you want to perform don't use mouse just keyboard
  8. Now Click Stop
  9. Save you script and save it on some location
  10. Right Click on script and select compile(X86)
  11. you will notice an .exe file created now use this .exe in your java code by following code

    Process process=Runtime.getRuntime().exec("abolute path of exe "); process.waitFor(); process.destroy(); or do following step open note pad and paste code mentioned below

    region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00000409) ---

    region --- Internal functions Au3Recorder Start ---

    Func _Au3RecordSetup() Opt('WinWaitDelay',100) Opt('WinDetectHiddenText',1) Opt('MouseCoordMode',0) Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '') If $aResult[1] <> '00000409' Then MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00000409->' & $aResult[1] & ')') EndIf

    EndFunc

    _AU3RecordSetup()

    endregion --- Internal functions Au3Recorder End ---

    Send("testUsername{TAB}Testpasword{ENTER}")

    endregion --- Au3Recorder generated code End ---

save file as "authenticationAD.au3" now create exe of this file like the same steps mentioned above in steps 11-12 please change testUsername and password with correct ones but don't remove and {Tab} {and Enter}

if you are still facing this problem then tell me i will email you java file with auto it script

fahad
  • 389
  • 2
  • 12