I am working with a .Net application where I enter data (date) into a textbox then click other boxes etc. then save. On Save the date entered is not passed on to save - I have tried to enter text then tab, enter etc. and I can’t get that date data to be saved.
I have tried to tab and enter on the mapped object as well as using Sys.Keys and neither works.
When I manually enter this date/data it is saved to the DB.
Originally posted by rraghvani on September 11, 2025
What version of TestComplete are you using? Can you see the date being entered in the field? Is it the correct format? If yes, use the Object Spy tool to verify that the field has actually been updated with your chosen date.
Originally posted by scot1967 on September 11, 2025
Hello Bill_H.
I would also log the properties of the object after the the enter, tab etc. I have seen apps do very odd things with .keys verses setText and weird things related to object focus.
Another things to try is to record a script and perform the action manually. If this works you should have a script example that works and you can fine tune and analyze actions from there.
… If you find my posts helpful drop me a like! Be sure to mark or post the solution to help others out and/or to credit the one who helped you.
Originally posted by Hassan_Ballan on September 11, 2025
It sounds like the issue may be related to how the application detects user input versus how TestComplete is setting the value programmatically.
If you’re able to enter the date correctly using the keyboard manually, then the issue may be that the application requires real keyboard events to register the value properly.
Thank you for the reply but I have tried Keys and Sys.Keys as well with no luck. I have also tried after that to tab/enter out of the field and still no luck.
Originally posted by Hassan_Ballan on September 11, 2025
What keyboard key strokes you need to tap to set it correctly?
Are you using code based script or KeywordTests script?
How are you doing it programmatically? provide the example. From the documentation link I provided, the listed example to press the keyboard escape key is
Hi there thanks for the suggestion - I actually did record the action and it used the methods I was. It does eventually pass a date but not the right date … the field has type ahead and a date picker associated with it.
The issue I have is that when the ‘right’ date is set in the field and then I move out and click another setting and save the ‘right’ date doesn’t seem to be committed so it is saved without the date. If I set the date then click out of it, in some cases, the date gets reset to today’s date ( I am trying to pass yesterday’s date) then I can save that.
I was using SetText and had tried Keys but it wasn’t working… I did just change again to use KEYS and pass a param and it seems to be working perfectly fine now