SPONSORS:






User Tag List

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

    Data entry using QTp 8.2

    Hello all .
    We are having continual problems with qtp not entering the data correctly in fields.
    For example entering liited instead of limited i have tried slowing it down but dosent seem to make any difference .
    Any help greatfully accepted .
    Stefano

  2. #2
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,788
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Data entry using QTp 8.2

    Stefano, what's the source of your data?

    I would try the 3 methods to try and iscolate the issue:

    1) Hard code the data
    2) use datatable
    3) call from an Excel SS.

    Try these and let us know what you find:

    Mark Smith.

  3. #3
    Junior Member
    Join Date
    Jan 2007
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Data entry using QTp 8.2

    The data is read from a text file
    Its not that the data is read incorrectly
    But when qtp is running it misses out characters when
    populating a field .

  4. #4
    Advanced Member
    Join Date
    Jan 2004
    Location
    UK
    Posts
    817
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Data entry using QTp 8.2

    Instead of using a .txt file, try changing the file type to csv (make sure you insert the commas)..

    HTH
    I like what i know and I know what i like

  5. #5
    Junior Member
    Join Date
    Jan 2007
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Data entry using QTp 8.2

    We have used csv files but this dosent make any difference.
    The data is being read correctly but when it is used in qtp
    eg [.set variable_Name] to a text field it is missing out a character . The variable_Name contains the correct string or number but qtp when applying it to a field seems to miss characters from the string or a digit from the number .
    Thanks for all your replies .
    Stefano

  6. #6
    Senior Member
    Join Date
    Feb 2001
    Location
    USA
    Posts
    776
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Data entry using QTp 8.2

    Post the code where you read data from Excel.
    Thanks,
    Prashant Patel

  7. #7
    Junior Member
    Join Date
    Jan 2007
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Data entry using QTp 8.2

    ' Read data from tab delimited text file
    Public Sub Acceptdatafields()

    Set objFSO = Createobject("Scripting.FileSystemObject")
    Set objTextFile = objFSO.OpenTextFile("C:\scripttest.txt" , 1)
    datafields = split(objTextFile.ReadLine, " ") ' Delimited by tab file
    End Sub
    ' End of script

    Reads from a Text file Tab delimited

    The values are assigned
    var_name = datafields (0)
    var_name_2 = datafields (1) and so on

    As i said when i step through and look for variable values in the viewer they are correct but in places the scipts are missing out letters when the are run even when the variable values are corrrect.

    eg
    Var_Name = "MyName"
    text box value = MName when script runs "y" has bee ommitted

    Thanks for your interest hope you can help

  8. #8
    Junior Member
    Join Date
    Jan 2007
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Data entry using QTp 8.2

    Try .Type Var_Name

  9. #9
    Junior Member
    Join Date
    Jan 2004
    Location
    Denver
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Data entry using QTp 8.2

    Loop through each character in the variable and enter that character in the edit field one at a time. You can create a simple while loop of for each loop to iterate the characters.

    If this happens sporadically, then pull the value from the text field, validate it against the variable and if it's different reenter the data.

  10. #10
    Senior Member
    Join Date
    Jan 2007
    Location
    Pune, India
    Posts
    466
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    QTP script to load Library file (.vbs) during run

    Thread hijacking! Post deleted! Read forum guidelines

 

 

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 9.38%
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 12:11 AM.

Copyright BetaSoft Inc.