In my OOB Silverlight application, I am extracting a value for current inventory $(QOH) and adding one to the value. How do I verify the new value of $(QOH) + 1 within a coded step?
1 Answer, 1 is accepted
0
Mario
Telerik team
answered on 30 Jan 2013, 06:17 PM
Hello Misty,
Thank you for contacting Telerik Support.
I believe you will just want to Assert.IsTrue() this particular condition within your coded step.
Here is an example in which we add 1 to the value of an extracted variable, assert whether this new value is what we would expect and update the extracted variable with the new value.
int num = Int32.Parse(GetExtractedValue("QOH").ToString());
num+=1;
Assert.IsTrue(num == expectedValue);
SetExtractedValue("QOH", num.ToString());
Please let me know whether my suggestion helps, or if you have any additional questions.
All the best,
Mario
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings