Micro Focus QTP (UFT) Forums
How to forward a recent mail from hotmail to gmail - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to forward a recent mail from hotmail to gmail (/Thread-How-to-forward-a-recent-mail-from-hotmail-to-gmail)



How to forward a recent mail from hotmail to gmail - rao - 07-02-2009

Hi,

I want to forward the recent mail from hotmail account to gmail account.
so i need a descriptive program to automate this above said scenario. can anyone help me out please. Thanks

regards,
rao


RE: How to forward a recent mail from hotmail to gmail - KVK - 07-09-2009

Hi,

Open Hotmail using valid username and password and then try this below code..

Code:
Gmail_ID = "asdhasd@gmail.com"

Set oBrowserFrame = Browser("creationtime:=0").Page("title:=Windows Live Hotmail").Frame("html tag:=IFRAME","html id:=UIFrame")

Set WebTable1 = oBrowserFrame.WebTable("name:=msgChk","html tag:=TABLE")

WebTable1.Object.Rows(0).Click ' Clicks the First row in the table assuming that first row is the most recent mail
wait 5
oBrowserFrame.WebElement("innertext:=Forward","html tag:=SPAN").WaitProperty "visible","True",5000
oBrowserFrame.WebElement("innertext:=Forward","html tag:=SPAN").Click
wait 2
Browser("creationtime:=0").Sync
Browser("creationtime:=0").Page("title:=Windows Live Hotmail").Sync
Set oBrowserFrame = Browser("creationtime:=0").Page("title:=Windows Live Hotmail").Frame("html tag:=IFRAME","html id:=UIFrame")
oBrowserFrame.WebEdit("html id:=AutoCompleteTo\$InputBox").set Gmail_ID
oBrowserFrame.WebElement("innertext:=Send","html tag:=SPAN").Click
wait 3
Browser("creationtime:=0").Sync
Browser("creationtime:=0").Page("title:=Windows Live Hotmail").Sync



RE: How to forward a recent mail from hotmail to gmail - rao - 07-14-2009

Hi KVK,
Thank you very much for your reply. It helped...