Forum Discussion

bdr100's avatar
New Contributor
6 days ago

Values from previous Textbox disappears when it's time to input the date value

Hello there! I'm working with TestComplete on an Electron-based Desktop application. I'm getting an issue where trying to create a form for a product (which requires NAME, TYPE, DESCRIPTION, START DATE, END DATE as inputs) is not filling up correctly when running the Keyword Test. This means that running the Keyword Test (or the script test translated from the Keyword Test) doesn't mimic the actual user-actions that I just recorded (although the screenshots from the Test Visualizer shows that all of the values are being inputted fine). 

Filling up the first 3 inputs (NAME, TYPE, DESCRIPTION) are done with no issues, but when it comes to auto filling up the START DATE, the values from the first 3 inputs disappear as the value for the START DATE is inputted (specifically when it's time to enter the year - just entering the month or day doesn't make the other values disappear). 

When using Object Spy, I notice that just having the month and day for the DATE values doesn't register the value, such that the outerHTML displays <input id="startDate" type="date" value="">, which could be the reason why it doesn't delete the first 3 values. However, adding the year (even just the first digit) removes the first 3 values on the texboxes. So having the START DATE value as "05/10/2024" gives the outerHTML:

<input id="startDate" type="date" value="2024-05-10">

Note that the input tag (or outerHTML) for the first 3 textboxes is formatted like this initially:

<input id="name" value="">

I believe it has something to do with how the first 3 inputs are TextBox Objects and are using the method SetText() while the START/END DATE inputs are a different Object which uses the method Keys(). 

I attached an image of the script version of the Keyword Test (where "customApp" is just a placeholder). I also attached the image of the form where I enter the information, in which the input for OWNER is also a textbox and should not matter since it's not editable (it's automatically generated).

Thank you so much for reading this and I would really appreciate the help!


No RepliesBe the first to reply