SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Sep 2010
    Location
    VT
    Posts
    45
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Text File / Stored file compare

    I am looking for the easiest way to compare the contents of a text file using VBscript. I saved the compare data as a file store and am unsuccessfully trying to compare to that. Is there any way to attain the new data in a text file and compare to the item in the store?

    I had attempted the following (doesn't work) :

    If Not Files.Compare(files.Screen_txt, "C:\Validation\newscreen.txt") Then
    Log.Warning("New list is different")

    I'd appreciate words of wisdom here. I'm sure it's easy but I'm new to TC and figuring it out as I go.

    Thanks!

  2. #2
    Member
    Join Date
    Sep 2010
    Location
    VT
    Posts
    45
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Text File / Stored file compare

    Wow... drrr.... I think I figured it out. When I change the files.Screen_txt to the exact path of the stored item, it continues with the comparison.

    Question now is, does Files.Compare method look inside the file and compare data or just bytes? Also, is there any way to get it to show the differences or do I need to use a diff tool?

  3. #3
    Senior Member
    Join Date
    Jul 2008
    Posts
    1,049
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Text File / Stored file compare

    Hi GreenMtnGal,

    [ QUOTE ]

    is there any way to get it to show the differences or do I need to use a diff tool?


    [/ QUOTE ]
    TestComplete provides built-in features for integration with text comparison tools. Please see the description of the "Files diff utility" option in the "Stores Options Dialog" (http://smartbear.com/support/viewarticle/11077/) help topic.

    [ QUOTE ]

    Question now is, does Files.Compare method look inside the file and compare data or just bytes?


    [/ QUOTE ]
    What do you mean by "data" here? All files are just bytes on your hard disk.
    Regards,
    Allen - SmartBear Support

 

 

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 11.54%
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 09:51 AM.

Copyright BetaSoft Inc.