I need a solution to download a PDF file from an web application in IE11 using selenium webdriver. Please find the below pop-up which I am trying to handle.
Below are the ways I tried handle the IE popup but unfortunately nothing helped.
I tried to handle this scenario using AutoIT using the below AutoIT script.
Sleep(5000)
Local $hIE = WinGetHandle("[Class:IEFrame]")
Local $hCtrl = ControlGetHandle($hIE, "", "[ClassNN:DirectUIHWND1]")
If WinExists($hIE,"") Then
WinActivate($hIE,"")
ControlSend($hIE ,"",$hCtrl,"{F6}")
Sleep(500)
ControlSend($hIE ,"",$hCtrl,"{TAB}")
Sleep(500)
ControlSend($hIE ,"",$hCtrl,"{enter}")
EndIf
Sleep(25000)
Though the above AutoIT script worked, but after execution of AutoIT script the webdriver scripts hangs up. Even a common system.out.println statement is not getting executed after handling the pop-up using above AutoIT script.
I tried to handle this pop-up using Robot class, but hard luck, that also not seems to be working.
I tried to disable this IE pop-up by doing some registry settings by going to the below path, HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\AttachmentExecute\
After doing certain registry settings, this pop-up is successfully getting disabled for .xlsx or .RDP files and not for .PDF files. But In my case I have a test case where I need to download a .pdf file and proceed with further webdriver scripts.
Guys, suggestion of any other workaround will be greatly appreciated.
Thank you, Sudheendran P L