Problem submitting form because AngularJS validation event not firing when valid field values entered

Using Firefox Katalon Recorder add-on (but have same problem with Chrome).
Trying to submit html form that uses AngularJS validation and includes an input field of type=‘date’. Found that the only command that will insert the date value is ‘SetText’ (not ‘type’ or ‘sendKeys’), but this does not trigger the event that changes the input class from ‘ng-invalid’ to ‘ng-valid’. On the other hand, with an input field of type='text, the command ‘sendKeys’ does insert text and trigger event that changes class from ‘ng-invalid’ to ‘ng-valid’.
Katalon script and page html extract copied below:

sendKeys//input[@name='name']//input[@name='name']TestProject 21b-10-2019 setText//input[@name='name']//input[@name='name']TestProject 21b-10-2019 sendKeys//input[@formcontrolname='consultationStart']2019-08-04 sendKeys//input[@formcontrolname='consultationStartTime']00:00 sendKeys//input[@formcontrolname='consultationEnd']2020-08-04 sendKeys//input[@formcontrolname='consultationEndTime']00:00 setText//input[@formcontrolname='consultationStart']2019-08-04 setText//input[@formcontrolname='consultationStartTime']00:00 setText//input[@formcontrolname='consultationEnd']2020-08-04 setText//input[@formcontrolname='consultationEndTime']00:00

At page load

Save

After manual input
changes form and input classes to ng-touched ng-dirty ng-valid
removes ‘disabled’ attribute from ‘Save’ button
clicking ‘Save’ successfully submits the form

Save

After Katalon Recorder input using ‘setText’
no changes to input/button classes but does put values in both input fields
changes form class ‘ng-pristine’ to ‘ng-dirty’
clicking ‘Save’ does nothing

Save

After Katalon Recorder input using ‘sendKeys’
changes ng-pristine to ng-dirty on both input fields but does not put value into date input field
changes form class ‘ng-pristine’ to ‘ng-dirty’
changes ‘name’ input field class ‘ng-invalid’ to ‘ng-valid’
clicking ‘Save’ does nothing

Save

After Katalon Recorder input using ‘sendKeys’ followed by ‘setText’
changes ng-pristine to ng-dirty on both input fields but and puts values into both input fields
changes form class ‘ng-pristine’ to ‘ng-dirty’
changes ‘name’ input field class ‘ng-invalid’ to ‘ng-valid’
Clicking ‘Save’ does nothing
(Html same as above)

1 Like

Hi,
I have the same problem, did you solved in any way?

1 Like

Hi looking for solution for same issue.
In my case form can be saved but filled input does not save.

Hi there,

Which of the three problems mentioned above are you currently having? Is it manual input, ‘setText’, or ‘sendKeys’?

Hi, in my case setText - it is perfomed (visually) but when form on webpage that I work on is ‘saved’ no value in inputs are saved.