This is a migrated thread and some comments may be shown as answers.

Verifying extracted value

4 Answers 179 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Misty
Top achievements
Rank 1
Misty asked on 05 Feb 2013, 06:39 PM
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? 

4 Answers, 1 is accepted

Sort by
0
Byron
Telerik team
answered on 08 Feb 2013, 05:08 PM
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
0
PP
Top achievements
Rank 1
answered on 16 May 2013, 07:07 AM
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 :)
0
Mario
Telerik team
answered on 16 May 2013, 03:40 PM
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
0
PP
Top achievements
Rank 1
answered on 17 May 2013, 08:22 AM
Thanks for the reply Mario :)
Your suggestion was helpful for me to look for another way of finding the element.
It works fine now :)
Tags
General Discussions
Asked by
Misty
Top achievements
Rank 1
Answers by
Byron
Telerik team
PP
Top achievements
Rank 1
Mario
Telerik team
Share this question
or