Test AutomationGeneral discussion about automated software testing tools and techniques |
||
Posts by Odin employees marked:
|
Hi Odin Support Team,
I am using Axe 2.0 and WatiN . I am trying map a new custom action “save.Add()”. I passed following command in Action Map Sheet Action is “save.Add(myVarName, numToAdd)” Command is “ rc = AxeMainAPI.DataSave("%OBJECT%", "%PARAM1%", Convert.ToString(Convert.ToInt32(value) + Convert.ToInt32("%PARAM2%")))” I got following error message while building the test case . “ LCT_Sessions_0005.cs(155,9): error CS0120: An object reference is required for the nonstatic field, method, or property 'OdinTechnology.Axe.Main.AxeMainAPI.DataSave(string, string, string)' c:\Program Files\Odin Technology\Axe\Odin.Axe.Main.dll: (Location of symbol related to previous error) “ Following script generated after build the test case for this step.:- “ axe.StepBegin( "TableSessionResults", "save.Add(SessionCountPlus1,1)", @""); rc = 0; rc = AxeMainAPI.DataSave("TableSessionResults", "SessionCountPlus1", Convert.ToString(Convert.ToInt32(value) + Convert.ToInt32("1"))); axe.StepEnd(rc, ""); Please help me how can I get fix this error . I am waiting your kind response. Thanks in Advance for help. Thanks & Regards Ramsingh Yadav Pune(India).
Your action should be using the instance object of the Axe API. Its not a static class. i.e.
Use axe.DataSave and not AxeMainAPI.DataSave Sam
Note we have a dedicated Axe forum at:
http://fogbugz.odin.co.uk/default.asp?axe |