Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I can't displaying all the pages name in the .txt file
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Code:
Dim Total_no_link
Dim clink ,rc,mysmgbox
Dim ln
Set fileSysObject=createobject("Scripting.FileSystemObject")
Set linksFileName=fileSysObject.opentextfile("D:\a1.txt",2,true)
Set cLink =description.Create()
cLink("html").value="A"
Browser("Login Page").Page("Login Page").WebList("select").Select "SQL2005"
Browser("Login Page").Page("Login Page").WebList("select_2").Select "VIL0910SQL2005"
Browser("Login Page").Page("Login Page").WebEdit("txtUserID").Set "nj"
Browser("Login Page").Page("Login Page").WebEdit("WebEdit").SetSecure "4a89374a064976d6f9f1"
Browser("Login Page").Page("Login Page").WebList("select_3").Select "WHFD00"
Browser("Login Page").Page("Login Page").WebList("select_4").Select "WHFD00"
Browser("Login Page").Page("Login Page").WebList("select_5").Select "FOOD"
Browser("Login Page").Page("Login Page").WebButton("Enter").Click
Browser("Login Page").Page("Main Menu Page").Link("General Master").Click
Set rc=Browser("Login Page").Page("Main Menu Page").ChildObjects(cLink)
Total_no_link=rc.count()
msgbox Total_no_link ' What does msgbox display ?
For i=0 to Total_no_link-1
[b]ln=Total_no_link(i).getRoProperty("name")[/b]
linksFileName.writeline(link_name)
Next
linksFileName.close
Set fileSysObject=nothing
Try this code and let me know if you get the same error message.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Messages In This Thread
RE: I can't displaying all the pages name in the .txt file - by basanth27 - 08-17-2009, 05:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Comapre txt file with different number of lines anushreebehura 0 1,741 06-02-2015, 06:28 PM
Last Post: anushreebehura
  QTP DP to click no. of pages rashmi2309 8 4,969 09-03-2009, 06:08 PM
Last Post: rashmi2309
  Reading from txt file on Quality Center stevol 0 2,100 01-13-2009, 04:02 PM
Last Post: stevol
  calling single script to identify web pages dynamically Anj 2 3,490 01-22-2008, 03:35 PM
Last Post: Anj

Forum Jump:


Users browsing this thread: 3 Guest(s)