SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    passing data to an excel

    Greetings,

    I created a QTP script that will enter data in webedits (email address, member id) for a registration form. It passes data using a data table. The Registration form does not accept data(email address, member id) of an already registered member, so I need to develop a script that will store or output the data from my first run into an excel. I will use this data to validate that the edits doesn't accept this data.

    'Enter Email Address
    Browser().Page(").WebEdit("Email Address").Set DataTable("Email_Address", dtLocalSheet)

    'Enter Member Name
    Browser().Page().WebEdit("MemberName").Set DataTable("Member_Name", dtLocalSheet)

  2. #2
    Senior Member
    Join Date
    Jul 2009
    Posts
    162
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: passing data to an excel

    Hi,



    Set oExcel = CreateObject("Excel.Application")
    ' Create Data.xls excel file & open
    Set oBook = oExcel.Workbooks.Open("C:\Data.xls")
    Set oSheet = oBook.Worksheets

    oSheet(1).Cells(2, 1).Value ="MemberID"
    oBook.Save
    oBook.Close

    Set oExcel = Nothing
    Set oBook = Nothing
    Set oSheet = Nothing


    I Think above code will help you.

    But I think you can verify the data with out saving into excel also.
    Before entering the Email etc first check this email is in datatable & proceed.

    Thanks,
    Nagesh

  3. #3
    Moderator ifraser's Avatar
    Join Date
    Jul 2004
    Location
    Brisbane, Australia
    Posts
    2,090
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: passing data to an excel

    Is this an interview question?
    You can buy my Art from: "Post Cards now available"
    Ian Fraser Landscape Photography
    World Wide Shipping.

    http://mowogman.wordpress.com/

  4. #4
    Senior Member
    Join Date
    Dec 2006
    Posts
    114
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: passing data to an excel

    Have the test data in an excel sheet. Import the sheet into QTPs datatable using inbuilt methods. run it for the first time. capture the value and update the datatable with new values. export the modified datatable to the excel sheet by replacing the actual excel data sheet.

    QTP has features/methods using that you can import/export excel sheet to/from datatable.
    Cheers,
    Diwakar

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 08:14 AM.

Copyright BetaSoft Inc.