Micro Focus QTP (UFT) Forums

Full Version: Clicking a link in an outlook email using QTP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 :

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