Ask a Question

html5 form validation

SOLVED
Lee_M
Community Hero

html5 form validation

Hi Guys,

 

I have a test that uses a data-driven loop across a simple html5 input

 

html5 has some simple validation that I would like to break out of my loop iteration (go to next case) is the validation box appears

 

Does anybody know how to do this, TC Object spy won't pick up the tooltip since it isn't really an object

 

Ex: https://tutorial.techaltum.com/html5-form.html

scroll down to :HTML5 Form New Attributes

 

This is the popup I need to capture and progress to the next loop iteration

Lee_M_1-1614936665264.png

 

2 REPLIES 2
hkim5
Staff

it seems that the pop up itself cannot be verified in a typical UI-element wise manner.

However, that popup (or rather the text value of the popup, seems to be captured in a property of the textfield itself called "validationMessage" where it reads "Please fill out this field." when the textfield is empty

hkim5_0-1614976387927.png

 

and instead returns an empty string when there is some input in the textfield itself

hkim5_1-1614976442750.png

you could look to verify that property via a checkpoint, to make sure that it either reads the intended value, or holds an empty string value instead.

Best,
Justin Kim
Lee_M
Community Hero

Thank you, I have been looking how to verify this and forgot to investigate extended properties of the object spy

cancel
Showing results for 
Search instead for 
Did you mean: