Hi Satnam,
Here is the code for getting the college names
''Creating an excel file
Set ObjExcel=CreateObject("Excel.Application")
ObjExcel.Visible=True
ObjExcel.Workbooks.Add
''Creating the object Description
Set ObjDesc = Description.Create()
ObjDesc("micclass").Value = "WebElement"
ObjDesc("class").Value = "college_name"
Browser("MBA Colleges in Delhi").Highlight
Set ObjElements = Browser("MBA Colleges in Delhi").Page("MBA Colleges in
Delhi").ChildObjects(ObjDesc)
'Getting the count of webelements
varNoOfColl= ObjElements.Count
''Writing the names of colleges
For intCollCnt=0 to varNoOfColl-1
strCollNam= ObjElements(intCollCnt).GetROProperty("innertext")
ObjExcel.Worksheets("Sheet1").Cells(intCollCnt+1,1)=strCollNam
Next
'Saving the excel file
ObjExcel.ActiveWorkbook.SaveAs "C:\Documents and Settings\"&
Environment.Value("UserName") &"\Desktop\List Of Colleges"
ObjExcel.Quit
Set ObjExcel=Nothing
Thanks
Saumya
On Monday, July 29, 2013 12:21:20 AM UTC+5:30, Satnam Singh wrote:
>
> Hello All,
>
> Please see the url
> http://www.indiacollegesearch.com/mba/colleges-delhi-ncr
>
> This url lists various colleges. What I want to do is using QTP, read the
> college name and put it into an excel sheet.
> Kindly help, as I am not sure how to proceed with this problem as the list
> is not under a webtable.
>
--
--
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 Groups "QTP
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.