Axe Test Automation PlatformGeneral discussion relating to the Axe Test Automation Platform from Odin Technology |
||
Posts by Odin employees marked:
|
Hi
I have a situation where I need to get the value of a Date field and enter the end date of the same month in another text field. I have tried to find solutions to this but I cannot enter the end date into the second field. I am working in Selenium c# and Axe 3.5.1. The code below is from my Action Map: string s = String.Format("{0}",axe.DataLoad("%OBJECT%", "%PARAM1%")); string[] words = s.Split('/'); int day = Int32.Parse(words[0]); int month = Int32.Parse(words[1]); int year = Int32.Parse(words[2]); int lastDay = (int)DateTime.DaysInMonth(year,month); string lastDate = System.String.Format("{0}/{1}/{2}",lastDay,month,year); axe.Data=lastDate; Can anyone assist? Thanks Jon
You need to have two separate functions in the Action Map or custom library:
1. An action for the get (which also incorporates a 'save' function (check axe documentation as there is a standard function)) 2.A set action which first loads the date and sets to the last working day In a subtest then place the 'getDate' function against the relevant object and 'setLastDayOfMonth' against the field to enter the data into. Hope this helps Mark |