How to write script to display a message box having
the "Date" value of the fourth mail(yahoo account).
I've tried it with the web table concept but the content
doesn't get displayed?
Please help me out to resolve this :-)

Answers were Sorted based on User's Feedback



How to write script to display a message box having the "Date" value of the fourth mail(..

Answer / venkatesh kodagi

Set oPageObject = Browser("browsername").Page
("pagename").Object
Set oTableObject = oPageObject.getElementsByTagName("table")


sActualText = oTableObject
(inxexoftable).rows(3).cells(columnnumberofdate).innerText

inxexoftable = if page have multiple tables then the index
should be the inbox table.

hope this will helps u.

Is This Answer Correct ?    2 Yes 0 No

How to write script to display a message box having the "Date" value of the fourth mail(..

Answer / amarendra kothuru

In Yahoo mail, if you want to fetch the Date of the four row
(mail), use the following code

E.g: Using record and playback
msgbox Browser("Yahoo! Mail - amar_kothuru@yah").Page
("Yahoo! Mail - amar_kothuru@yah").WebTable
("Sender").GetCellData(4,9)

E.g.:Using Descriptive Programming
msgbox Browser("name:=Yahoo! Mail -
amar_kothuru@yahoo.co.in").Page("title:=Yahoo! Mail -
amar_kothuru@yahoo.co.in").WebTable
("name:=toggleAll").GetCellData(4,9)


Why you are not able to fetch the date value is

Sometimes QTP gives invalid column count of the webtable
and if you follow the same, you can't able to fetch all
column values.. So try different combinations of column
numbers(more than actual columnCount) and get the results.

When you add Webtable object to object repository and it
shows the column count as 7. I think, you tried upto the
column number 7. But if you pass the column number as 9,
you could get the date value. if pass column number as 10,
you would get Size value.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More QTP Interview Questions

Can we run test with out adding object in object repository? How it is possible?

0 Answers  


What does "Dynamic change on web pages" means.As per my knowledge, this comes in "Complete" level of Active screen capture levels, where it says, "Also dynamic changes on web changes are saved.so i want to know what type of dynamic changes are made and is this dyanmic changes efftes only on web application or any other?

0 Answers   EDS,


how to reverse the string without using bultin functions(i.e mean mid,len ,reverse functions)

6 Answers   GE,


in how many ways you perform batchtesting?

2 Answers   Sapient,


How to track the execution time?

2 Answers  






how to change the properties of object during run time . plz give the code using flight reservation

2 Answers  


How to get the particular property value?

0 Answers  


Pls explain me the difference between ........ Description.Create and CreateObject

5 Answers  


What In-string function will do?

1 Answers  


How should I get results when I run scripts in a Batch mode

1 Answers   TCS,


Write a script to print below pattern 5 4 3 2 1 5 4 3 2 5 4 3 5 4 5

2 Answers  


Diff between Test Stratergy and Test Plan? Diff b/w Test design ansd test case design?

1 Answers  


Categories