Hello,
I am trying to automate some tests on Test Sudio framework and now I'm having some problems.
I am trying to compare two values on diffrent grids. This values are dynamic so their different on each reproduction.
Here is the code that I am using right now and is not correct:
" [CodedStep(@"Verify RootGrid1.Name 'Equal' 'Root'", RequiresSilverlight=true)]
public void Req216_CodedStep()
{
// Verify RootGrid1.Name 'Equal' 'Root'
Assert.IsFalse((ArtOfTest.Common.CompareUtils.StringCompare(Pages.HttpGlintthsdemo8700Shell.SilverlightApp.RootGrid1.Name, "Root", ArtOfTest.Common.StringCompareType.Exact) == false), string.Format("Verify RootGrid1.Name \'Equal\' \'Root\' failed. Actual value \'{0}\'", Pages.HttpGlintthsdemo8700Shell.SilverlightApp.RootGrid1.Name));
}
[CodedStep(@"Verify RootGrid2.Name 'Equal' 'Root'", RequiresSilverlight=true)]
public void Req216_CodedStep1()
{
// Verify RootGrid2.Name 'Equal' 'Root'
Assert.IsFalse((ArtOfTest.Common.CompareUtils.StringCompare(Pages.HttpGlintthsdemo8700Shell.SilverlightApp.RootGrid2.Name, "Root", ArtOfTest.Common.StringCompareType.Exact) == false), string.Format("Verify RootGrid2.Name \'Equal\' \'Root\' failed. Actual value \'{0}\'", Pages.HttpGlintthsdemo8700Shell.SilverlightApp.RootGrid2.Name));
}
[CodedStep(@"Verify RootGrid2.Name 'Equal' Verify RootGrid1.Name + 1", RequiresSilverlight=true)]
public void Req216_CodedStep2()
{
// the value of rootgrid2 needs to be the value on rootgrid1 +1
int val2 = Convert.ToInt32(Pages.HttpGlintthsdemo8700Shell.SilverlightApp.RootGrid2.Text);
int val1 = Convert.ToInt32(Pages.HttpGlintthsdemo8700Shell.SilverlightApp.RootGrid1.Text);
int val_c = val1 + 1;
// Verify RootGrid2.Name 'Equal' Verify RootGrid1.Name + 1
Assert.AreNotEqual(val2, val_c);
} "
What I am doing wrong?
Thank you.
Best regards,
Maria
I am trying to automate some tests on Test Sudio framework and now I'm having some problems.
I am trying to compare two values on diffrent grids. This values are dynamic so their different on each reproduction.
Here is the code that I am using right now and is not correct:
" [CodedStep(@"Verify RootGrid1.Name 'Equal' 'Root'", RequiresSilverlight=true)]
public void Req216_CodedStep()
{
// Verify RootGrid1.Name 'Equal' 'Root'
Assert.IsFalse((ArtOfTest.Common.CompareUtils.StringCompare(Pages.HttpGlintthsdemo8700Shell.SilverlightApp.RootGrid1.Name, "Root", ArtOfTest.Common.StringCompareType.Exact) == false), string.Format("Verify RootGrid1.Name \'Equal\' \'Root\' failed. Actual value \'{0}\'", Pages.HttpGlintthsdemo8700Shell.SilverlightApp.RootGrid1.Name));
}
[CodedStep(@"Verify RootGrid2.Name 'Equal' 'Root'", RequiresSilverlight=true)]
public void Req216_CodedStep1()
{
// Verify RootGrid2.Name 'Equal' 'Root'
Assert.IsFalse((ArtOfTest.Common.CompareUtils.StringCompare(Pages.HttpGlintthsdemo8700Shell.SilverlightApp.RootGrid2.Name, "Root", ArtOfTest.Common.StringCompareType.Exact) == false), string.Format("Verify RootGrid2.Name \'Equal\' \'Root\' failed. Actual value \'{0}\'", Pages.HttpGlintthsdemo8700Shell.SilverlightApp.RootGrid2.Name));
}
[CodedStep(@"Verify RootGrid2.Name 'Equal' Verify RootGrid1.Name + 1", RequiresSilverlight=true)]
public void Req216_CodedStep2()
{
// the value of rootgrid2 needs to be the value on rootgrid1 +1
int val2 = Convert.ToInt32(Pages.HttpGlintthsdemo8700Shell.SilverlightApp.RootGrid2.Text);
int val1 = Convert.ToInt32(Pages.HttpGlintthsdemo8700Shell.SilverlightApp.RootGrid1.Text);
int val_c = val1 + 1;
// Verify RootGrid2.Name 'Equal' Verify RootGrid1.Name + 1
Assert.AreNotEqual(val2, val_c);
} "
What I am doing wrong?
Thank you.
Best regards,
Maria