Results 1 to 4 of 4

Thread: Retrieve data from webpage

  1. #1
    Geek_Guest
    Guest

    Retrieve data from webpage

    How can I retrieve text (data) from a web page to QTP Data Table.

    (All the text present in page are identified as web elements With diff title i dont want to add all the elements . I want to retriev the text line by line & put the same into dataTable) Any script which may help me out

    Question asked by visitor Ravi


  2. #2
    Expert Member
    Join Date
    Apr 2008
    Answers
    1,859

    Re: Retrieve data from webpage

    hai friend,

    If you need top retrieve current text please use get RO property and save it to the datatable

    for ex:
    text=Browser("B").Page("P").WebEdit("E").GetRoProperty("text")

    Thanks
    Deepa


  3. #3
    Expert Member
    Join Date
    Jun 2008
    Answers
    204

    Re: Retrieve data from webpage

    In most web page, texts and/or information are listed in webtable - row & col. Therefore, the effective way is to loop through the table and get the text.

    Example,

    1) get your datable rowcount
    2) use loop
    then use the below to save text to your variable or write to your resource.

    myText = browser("b").Page("p").WebTable("t").GetCellData(r,c)

    Last edited by learqtptesting; 05-29-2009 at 10:32 AM.

  4. #4
    Junior Member
    Join Date
    Jun 2009
    Answers
    2

    Re: Retrieve data from webpage

    1.by applying output parameter check point on that object.
    2.by applying GetRoProperty method on that object (or)
    3.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact