SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Member
    Join Date
    Feb 2007
    Posts
    71
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to capture the property of the checks

    Hi

    since the return value of the execute check method is a boolean how to capture the content of the check into a variable using TestPartner. By the way how to transfer the o/p of the executed testpartner script into an individual external excel file. Please help me in this regard.
    Moreover after getting the test data into TestPartner from an external excel file how to come up with individual checks for each row of the test data.


    Regards,
    Vinesh

  2. #2
    Senior Member
    Join Date
    Jun 2002
    Location
    farmington hills, MI, US
    Posts
    713
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to capture the property of the checks

    I think what your looking for are dynamic checks. You could do something like the following. I'm not sure what you mean by "o/p". Maybe you could clarify if this doesn't help.

    <font class="small">Code:</font><hr /><pre>
    Dim b As Boolean

    ' First use a content check that exists in
    ' the database
    b = ExecuteCheck("Untitled_103")

    ' if the check passed, get the data using
    ' a dynamic check
    If (True = b) Then

    Dim tc As TContentCheck
    Dim o As Object
    Dim ti As TItems

    Set tc = ContentCheck("content")

    ' This is the explorer listview
    tc.AttachName = "TypeName=ListView Index=1"
    tc.CaptureData

    Set ti = tc.Items

    For Each o In ti
    MsgBox o.Item(1)
    Next

    End If
    </pre><hr />

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

    Re: how to capture the property of the checks

    Hi

    Thanks for your response. "o/p" refers to the output of the check.


    Regards,
    Vinesh

  4. #4
    Senior Member
    Join Date
    Jun 2002
    Location
    farmington hills, MI, US
    Posts
    713
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to capture the property of the checks

    Ahhhhh! I think I know what you mean by o/p. The output of the result. The best way to do it would be to determine what criteria you want and build you own result based on return values.

    You could do this many different ways depending on your needs. You could have an ActiveData asset that you write the data to. You could reference Excel and send it the data using the Excel interface. You could use an ODBC driver and write to a database. It really goes on and on.

    In TP you can export your logs to XML but you can't really access result information directly. So you could export to XML and create a script that pulls out the information that you want.

    [img]/images/graemlins/grin.gif[/img] Your response beat me to the punch. I think it still applies though. You can do the same with a check and the previous code.

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

    Re: how to capture the property of the checks

    Hi

    In the below statement

    Set tc = ContentCheck("content")


    what does this "content" refer to .
    Can we apply the same logic to text checks and bitmap checks. If not please let me know like how to implement the same logice for the case of text checks and bitmap checks.


    Regards,
    Vinesh

  6. #6
    Member
    Join Date
    Feb 2006
    Location
    Gujarat, India
    Posts
    238
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to capture the property of the checks

    If you are using TestPartner 6.0 Visual test, you can add an expression equating your local variable with the tplastcheck (TP Variable), which will give the boolean variable for the result.

  7. #7
    Senior Member
    Join Date
    Jun 2002
    Location
    farmington hills, MI, US
    Posts
    713
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to capture the property of the checks

    The 'Set' statement in vb assigns a variable to an actual object. So in this case it is assigning a ContentCheck object to the defined content check variable.

    ************************************************** ***
    I think I may have missed the whole "content" of your last posting. [img]/images/graemlins/tongue.gif[/img] I think "content" is irrelevant and could be any string value. It is just needed in order to init the function call.

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

    Re: how to capture the property of the checks

    hi chief

    the code which you have sent works well to capture the content or property only for content checks but i am searching for the code which captures the text for text checks and bitmap checks and field checks , so that i can compare the actual value with the expected value and go with further coding. Else how can i get the actual value that is captured by any type of check except content check.



    Regards,
    Vinesh

  9. #9
    Senior Member
    Join Date
    Jun 2002
    Location
    farmington hills, MI, US
    Posts
    713
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to capture the property of the checks

    I don't think that you can use a text check but you should be able to store your baseline/predefined text in ActiveData and then use a combination of ActiveData and the CaptureText method for any object so that you can then use string comparison and a userCheck for pass/fail.

    The TBitmapCheck states that you can use a predefined image to compare against the actual image. You may have some success with that. Try looking in the TP help. Here is the sample code used in the help file.

    <font class="small">Code:</font><hr /><pre>
    Dim b As TBitmapCheck
    Set b = BitmapCheck("bitmapcheck1")

    b.AttachName = "Run Window"
    b.Bitmap = "c:\picture.bmp"
    b.CaptureData 'load the bitmap file
    b.WindowClient = True
    MsgBox b.Execute
    </pre><hr />

    The TFieldCheck allows you to insert the expected text, so you should be able to use it along with ActiveData to do field comparison. If the check fails, you can then use the CaptureText method to get the actual text and then right the result however you feel best fits your needs.

  10. #10
    Junior Member
    Join Date
    Feb 2007
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to capture the property of the checks

    Hi chief

    thanks for your timely response. As you were saying regarding the Text check can you please post one sample regarding the text check so that it will be comfortable for me as you have did for Bitmap check and content check. I await for your response.

    Thanks in advance

    Regards,
    Vinesh.

 

 
Page 1 of 2 12 LastLast

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.40 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:29 PM.

Copyright BetaSoft Inc.