Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
unable to send email - descriptive programming
#1
Code:
Set IE = CreateObject("InternetExplorer.Application") IE.visible = True IE.Navigate "www.hotmail.com" wait (2) Browser("name:=Sign In").Page("title:=Sign In").WebEdit("name:=login").Set "vimalsingh2k@hotmail.com" wait (2) Browser("name:=Sign In").Page("title:=Sign In").WebEdit("type:=password").SetSecure ".........." wait (2) Browser("name:=Sign In").Page("title:=Sign In").WebButton("type:=submit").Click wait (10) Browser("name:=Windows Live Hotmail").Page("title:=Windows Live Hotmail").Link("html id:=NewMessage").Click wait (10) Browser("name:=Windows Live Hotmail").Page("title:=Windows Live Hotmail").WebEdit("name:=WebEdit","type:=textarea","html id:=AutoCompleteTo$InputBox").set "vimalsingh2k@gmail.com" 'it doesnt accept email address wait(10) Browser("name:=Windows Live Hotmail").Page("title:=Windows Live Hotmail").WebEdit("name:=fSubject").Set "Hi" wait(10) Browser("name:=Windows Live Hotmail").Page("title:=Windows Live Hotmail").WebElement("html tag:=BODY").Set "Good Morning ..." 'unable to write text here wait(10) Browser("name:=Windows Live Hotmail").Page("title:=Windows Live Hotmail").Link("text:=Send").Click wait (5) Browser("name:=Windows Live Hotmail").Page("title:=Windows Live Hotmail").Link("text:=sign out").click
Reply
#2
try using only html id for text area :
Code:
Browser("name:=Windows Live Hotmail").Page("title:=Windows Live Hotmail").WebEdit("html id:=.*InputBox.*").set "vimalsingh2k@gmail.com"
Reply
#3
Hi vimal,

If that is the dynamic object then better you can use descriptive programming to get unique field, hope this will help you to solve your problem

Thanks
Mahesh
Reply
#4
HI Mahesh,

Thanks for your immediate reply.. but it didnt work.. I did tried with additional property as well. One more thing how to write text in body. I am unable to do so as well
Reply
#5
hi
'vimal singh'
try with this one it going to work

Code:
Set IE = CreateObject("InternetExplorer.Application") IE.visible = True IE.Navigate "www.hotmail.com" wait (2) browser("creationtime:=.*").page("title:=.*").Link("name:=Gmail").Click browser("creationtime:=.*").page("title:=.*").webEdit("name:=Email").Set "uid" browser("creationtime:=.*").page("title:=.*").webEdit("name:=passwd").Set "pwd" browser("creationtime:=.*").page("title:=.*").WebButton("name:=Sign in").Click browser("creationtime:=.*").page("title:=.*").Link("name:=Compose Mail").Click browser("creationtime:=.*").page("title:=.*").webEdit("name:=to").set "sample@gmail.com" browser("creationtime:=.*").page("title:=.*").webEdit("name:=subject").Set "sample mail" browser("creationtime:=.*").page("title:=.*").WebEdit("name:=body").Set "hi dear how are u ?" browser("creationtime:=.*").page("title:=.*").WebButton("text:=Send").Click
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Dynamic descriptive Programming issue in Terminal Emulator cprasad 1 2,494 04-25-2019, 08:17 PM
Last Post: Ankur
  Extracting Email Body from Outlook waseem.khan.91 0 2,761 03-04-2019, 02:53 PM
Last Post: waseem.khan.91
  Extracting Email Body from Outlook waseem.khan.91 0 1,610 03-01-2019, 02:51 PM
Last Post: waseem.khan.91
  Find the email using subject with the help of vb script Raheem Shaik 0 2,185 12-12-2018, 02:57 PM
Last Post: Raheem Shaik
  UFT Tool support with Descriptive programming laks 1 2,330 07-05-2018, 05:31 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)