Forum Discussion
AlexKaras
11 years agoChampion Level 3
Guys,
First of all, it would really help if you let us know at least what type of application you are automating: desktop, web, flash, silverlight, etc. I am not even wondering about the class name of the calendar control...
Another question: do you need to test the calendar control itself or just be able to get/set its value?
In the latter case, the following approach worked quite often for me:
-- Find a property that either corresponds to what you see on the screen (e.g. 02/05/14) or contains date value in the numeric form (e.g. 10215 which can be obtained by the call, for example, to aqConvert.StrToDate()), try to assign a value to this property and than check if the tested application obtains correct expected value (e.g. that expected date is used in the subsequent calculations);
-- If it looks like that after the above step the tested application obtains incorrect date, then, probably, some internal control's fields were not updated. In this case, after the date value was assigned to the property, you may try to open the drop-down calendar using whatever method is supported by the control (e.g. click button with the triangle, press down arrow key, etc.). The chances are high that after the calendar drop-down will be opened, the correct date will be highlighted. In this case just confirm the selection (e.g. click OK, press Enter, etc.) and with high probability all internal control's fields will be updated correctly;
-- The last chance is to look for the exposed method (on the Methods page of the Object Browser) that can be used to set the required date value to the control.
Hope that the above will help.
First of all, it would really help if you let us know at least what type of application you are automating: desktop, web, flash, silverlight, etc. I am not even wondering about the class name of the calendar control...
Another question: do you need to test the calendar control itself or just be able to get/set its value?
In the latter case, the following approach worked quite often for me:
-- Find a property that either corresponds to what you see on the screen (e.g. 02/05/14) or contains date value in the numeric form (e.g. 10215 which can be obtained by the call, for example, to aqConvert.StrToDate()), try to assign a value to this property and than check if the tested application obtains correct expected value (e.g. that expected date is used in the subsequent calculations);
-- If it looks like that after the above step the tested application obtains incorrect date, then, probably, some internal control's fields were not updated. In this case, after the date value was assigned to the property, you may try to open the drop-down calendar using whatever method is supported by the control (e.g. click button with the triangle, press down arrow key, etc.). The chances are high that after the calendar drop-down will be opened, the correct date will be highlighted. In this case just confirm the selection (e.g. click OK, press Enter, etc.) and with high probability all internal control's fields will be updated correctly;
-- The last chance is to look for the exposed method (on the Methods page of the Object Browser) that can be used to set the required date value to the control.
Hope that the above will help.