Ask a Question

Message "Field is required" appears during Test Run

Senior Member

Message "Field is required" appears during Test Run

Dear Friends!


I am facing the issue during test run of the web application. When save button is pressed, the "field required validator" gets applied on the two fields (text boxes) despite that the values in these fields are already available. Please see the attached snap "02 - Test Run - Field Required Issue Faced".


However, we do not face as such issue during test recording and data gets saved successfully. Please see the attached snap "01- Test Recording - No Issue Faced"


Anyone can help me that why does it happen? Please note that we use angular JS and devex controls in the application and we are using browser Internet Explorer Version 11 (we have already applied recommended browser related changes as descripbed by smarbear and further, we use trial version of the testcomplete).



Best Regards,

Muhammad Shamsher Khan

Community Hero

Re: Message "Field is required" appears during Test Run

Here's my best guess:


When you're filling the data into those fields, you're using the "SetText" method on the component to set the text value rather than "Keys".  Sometimes, in applications, there's an "OnExit" event that fires upon exiting the field that triggers other code.  MOST of the time, the SetText method works fine with this but there are few occasions where this kind of problem happens.

Try changing to use "Keys" instead of "SetText".  If that still doesn't work, add a "[Tab]" character at the end of the Keys string to tab to the next field to trigger that OnExit event.

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Showing results for 
Search instead for 
Did you mean: