12-12-2014, 06:16 PM
Hello All,
I am trying to automate file download in IE9.
I am using UFT 11.53 in Win7 environment.
I tried to capture IE9 download bar using object repository , Though it is capturing the object as navigation bar(Class : WinObject), it is not working when used in script.
I want to click the save button in the IE download bar.
I tried the following code , but it did not work .
According to one of the forms , the below code is said to click the save as button . It did not work for me.
code:
Please help.
I am trying to automate file download in IE9.
I am using UFT 11.53 in Win7 environment.
I tried to capture IE9 download bar using object repository , Though it is capturing the object as navigation bar(Class : WinObject), it is not working when used in script.
I want to click the save button in the IE download bar.
I tried the following code , but it did not work .
According to one of the forms , the below code is said to click the save as button . It did not work for me.
code:
Code:
Set DeviceReplay = CreateObject("Mercury.DeviceReplay")
Browser("creationtime:=0").WinObject("nativeclass:=DirectUIHWND","regexpwndclass:=DirectUIHWND", "index:=0").highlight
Browser("creationtime:=0").WinObject("nativeclass:=DirectUIHWND","regexpwndclass:=DirectUIHWND", "index:=0").Clickontext "Save",,,,,true,micRightBtn,true
DeviceReplay.PressKey 208 'Presses 'down arrow' key
DeviceReplay.PressKey 30 'Presses 'a' key
Set DeviceReplay = Nothing
Please help.