Hi Nidhi,
Look into the below given code, modify according to your scenario and try.
''''**** right click a weblink(say Hindi on google page) and selecting the
option 'Save Target As...' and save the file in specified location
w=(Browser("Google").Page("Google").Link("Hindi").GetROProperty("width"))/2
h=(Browser("Google").Page("Google").Link("Hindi").GetROProperty("height"))/2
Setting.WebPackage("ReplayType") = 2
Browser("Google").Page("Google").Link("Hindi").Click w,h,micRightBtn
Setting.WebPackage("ReplayType") = 1
Window("hwnd:="&Browser("Google").GetROProperty("hwnd")).Type micDwn + "A"
+ micReturn
wait 2
Browser("Google").Dialog("Save As").WinEdit("Edit").Set
"E:\google_co_in.htm"
Browser("Google").Dialog("Save As").WinButton("Save").Click
Thanks,
Srinivas.
On Tue, Apr 10, 2012 at 3:40 PM, Nidhi Sharma <[email protected]>wrote:
> Hi,
>
> Please let me know,if any one have any solution for the below mentioned
> query.
>
> I have to right click on the attachment and want to save it as "Save As
> Target".
> The attcahment is linked to an email.
>
> I am using the below code...but it doesn't hlped me out
>
> Set WshShell = CreateObject("WScript.Shell")
> idx = 15 ' Option number
> For i = 1 To 5
> WshShell.sendkeys "{DOWN}"
> next
> If i=3 Then
> WshShell.sendkeys "{ENTER}"
> end if.
>
> This code clicks directly on the attachment but donot perform the right
> click action.
>
> Please let me know if anyone has any solution for this.
>
> Thanks and Regards,
> Nidhi
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en