Hope this will work for you this is for Gmail but i think you can change it
to Yahoo either
Dim bro
Set bro = description.Create
bro("micclass").value = "browser"
dim pag
Set pag = description.Create
pag("micclass").value = "page"
Dim un
Set un = description.Create
un("html id").value = "Email"
Dim pwd
Set pwd = description.Create
pwd("html id").value = "Passwd"
Dim sg
Set sg = description.Create
sg("html id").value = "signIn"
Dim inbox
Set inbox = description.Create
inbox("innertext").value = "Inbox .*"
'Login to the application
browser(bro).page(pag).webedit(un).Set "mail id"
browser(bro).page(pag).webedit(pwd).Set "password r"
browser(bro).page(pag).webbutton(sg).Click
browser(bro).page(pag).Sync
Dim fr
Set fr = description.Create
fr("name").value = "canvas_frame"
Dim wt
Set wt = description.Create
wt("html id").value = ":om"
tot = browser(bro).page(pag).webtable(wt).GetROProperty("rows")
For j = 1 to tot
t = browser(bro).page(pag).webtable(wt).GetCellData(j,6)
p = "C2C DealC2C"
Dim myRegExp
Set myRegExp = New RegExp
myRegExp.IgnoreCase = True
myRegExp.Global = True
myRegExp.Pattern = (p)
Set oMatches = myRegExp.Execute(t)
For each matches in oMatches
set x = browser(bro).page(pag).webtable(wt).Childitem(j,2,"WebElement",0)
x.click
Next
next
Regards
Shashi...
On Wed, Jul 25, 2012 at 9:58 PM, sachin mahajan <[email protected]> wrote:
> Hi Zaheer,
>
> u can use the below code for clicking for particular mail
>
> rows=Browser("name:=Gmail - Inbox").page("title:=Gmail -
> Inbox").webtable("html tag:=TABLE","name:=t").GetROProperty("rows")
> For i=0 to rows
> a=Browser("name:=Gmail - Inbox").page("title:=Gmail -
> Inbox").webtable("html tag:=TABLE","name:=t").GetCellData(i,2)
> print(a)
> If a ="media soft" Then
> Set objects=Description.Create
> objects("html tag").value="A"
> ' objects("name").value="t"
> set o=Browser("name:=Gmail - Inbox").Page("title:=Gmail -
> Inbox").webtable("html tag:=TABLE","name:=t").childobjects(objects)
> o(i).Click
> Exit For
> End if
>
> Next
>
> On 7/25/12, Hamza Zaheer <[email protected]> wrote:
> > Hi All,
> >
> > I am using the same code, but I am getting Object Not Found error, any
> > suggestions?
> >
> > On Friday, March 4, 2011 3:37:52 PM UTC+1, avi wrote:
> >>
> >> Hi,
> >>
> >> I'm working with yahoo mail and my intent is to click on a certain mail
> >> with the "Subject<something>"
> >>
> >> The following code works fine, if the mail subject is unique.
> >>
> >>
> >>
> >>
> >>
> Browser("name:=Inbox.*").Page("title:=Inbox.*").Link("text:="&linkName).Click
> >>
> >>
> >>
> >> But when the subject repeats, I need to click on the latest mail (ie 1st
> >> from
> >> the web table) so I tried the following code.
> >>
> >>
> >>
> >> rowCount=Browser("Inbox (19) - Yahoo! Mail").Page("Inbox (19) - Yahoo!
> >> Mail").WebTable("Inbox").GetROProperty("Rows")
> >>
> >>
> >>
> >> For i=2 to rowCount
> >>
> >> If Browser("Inbox (19) - Yahoo! Mail").Page("Inbox (19) - Yahoo!
> >> Mail").WebTable("Inbox").GetCellData(i,7)=linkName Then
> >>
> >> ...........
> >>
> >> I'm stuck here.
> >>
> >>
> >>
> >> Please suggest me a method to click on the link available in the web
> >> table
> >>
> >> Please correct me if I’m wrong
> >>
> >>
> >>
> >> Thanks and regards,
> >>
> >> Avinash
> >>
> >>
> >
> > --
> > 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
>
--
Regards
Shashidhar
+91 -8125564879
[email protected]
--
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