Verifying extracted value

5 posts, 0 answers
  1. Misty
    Misty avatar
    3 posts
    Member since:
    Jun 2012

    Posted 05 Feb 2013 Link to this post

    I am using an extract step to grab the current value of an available item, AI.  Later on in the test, I am using a verify step with the DataBindVariableName $(AI) to compare this item with the extracted item to see if they are the same.  When running my test, it fails saying that my verifying item is not the same as the extracted item.  I know that they are the same so I did a little research.  When it is running the extract step, it is always using the item that was used when I recorded this step and not extracting the current item during each run.  Am I missing something to make the step extract the value at the time of each time the test is run? 
  2. Byron
    Admin
    Byron avatar
    184 posts

    Posted 08 Feb 2013 Link to this post

    Hi Misty,

    I'm slightly unclear to me just what the behavior is here, so I'll try to cover the bases. An extraction step locates an element using find logic and assigns its current value to a variable. If the value is the same every time, then either the target element value is the same every time, or the wrong element is being targeted.

    •  If the target element's value is the same every time, it may be that you are extracting a different attribute than you want -- one that stays the same rather than varying. Consider opening the verification builder for the target element and examining the different attributes to verify against.
    • If the wrong element is being targeted, examine the find logic for the target element of the verification step for possible problems.

    If these approaches do not resolve your issue, we will need more information about your test scenario. Please provide us with a copy of your test and access to your application. Also, please provide your failure log and a copy of the DOM at the time of failure. You can export these to file from the failure tab for your test and add them to a .zip archive. If it is not possible to grant us access to your application, please take a Fiddler trace and attach it to a support ticket in a zip file. You can capture a Fiddler trace using FiddlerCap. A Jing video of the behavior may also help us diagnose your issue. Thanks for helping us advise you.
    Regards,
    Byron
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. PP
    PP avatar
    7 posts
    Member since:
    Apr 2013

    Posted 16 May 2013 Link to this post

    Hi, I am also facing the same issue as mentioned above.
    I am extracting date from a text box. It works for the day I record it, but later when the date changes, the extraction step fails.
    Kindly reply with the possibilities where I might be going wrong.
    Hoping a quick reply :)
  4. Mario
    Admin
    Mario avatar
    8 posts

    Posted 16 May 2013 Link to this post

    Hi Prerna,

    The most likely reason that an extract step would fail in such a manner is from ineffective find logic. For instance, if find logic were to use TextContent or InnerText (whose value would be the date when it was recorded) as a filter, it would fail once this date changed. If this is the case, I suggest changing how this element is found in such a way as to not use the dynamic text you are intending on extracting in its find logic.

    The best resource for troubleshooting the error will be the step failure details. If you are unable to resolve the issue yourself, please choose the option to 'Export Result to File' from the failing step and attach the created ZIP file for us to review.

    Regards,
    Mario
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  5. PP
    PP avatar
    7 posts
    Member since:
    Apr 2013

    Posted 17 May 2013 Link to this post

    Thanks for the reply Mario :)
    Your suggestion was helpful for me to look for another way of finding the element.
    It works fine now :)
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!