06-15-2014, 01:25 AM
Hi ,
I need to automate clicking on an activation link which is sent as part of an auto-generated email.
I am able to display the email,but unable to get QTP to focus on the link to click it.
Here's my code :
The email contains a link that I need to click on.
Any suggestions /help will be highly appreciated.
Thanks,
Kirti
I need to automate clicking on an activation link which is sent as part of an auto-generated email.
I am able to display the email,but unable to get QTP to focus on the link to click it.
Here's my code :
Code:
Set objOutlook = CreateObject("Outlook.Application")
Set objNameSpace = objOutlook.GetNamespace("MAPI")
' Secondary mailbox
Set objFolder= objNameSpace.Folders(2)
'msgbox objFolder
' Display the mailbox
objFolder.display()
'Set the Folder
Set InboxFolder =objFolder.Folders("Inbox")
msgbox "Opened " &objFolder
For Each x In InboxFolder.Items
x.Display
'Exit the for loop once the first email is found
Exit For
Next
The email contains a link that I need to click on.
Any suggestions /help will be highly appreciated.
Thanks,
Kirti