protractor icon indicating copy to clipboard operation
protractor copied to clipboard

How to validate that bootstrap validation popup message is being displayed ? [question]

Open JesusLopezCh opened this issue 12 years ago • 4 comments

Whenever I click on save/submit button leaving field in blank, or entering an invalid email, validation error message is displayed, is there any way I can validate this?, since it is not in the DOM.

bootstrap popup

JesusLopezCh avatar Aug 19 '14 22:08 JesusLopezCh

getText the error message of element by xpath and keep it in expect statement.

Example: var Errormsg = element(by.xpath("paste the xpath here")); expect(Errormsg.getText()).toEqual("! Please fill out this field."); Regards, Santhosh

santhoshchunchu avatar Aug 20 '14 09:08 santhoshchunchu

The thing is that there isn't any xpath or way to find this error as an element in the HTML:

<input id="customer-name" type="text" class="form-control ng-pristine ng-invalid ng-invalid-required"
 placeholder="Customer Name" ng-model="customer_name" required="true" maxlength="40" required="required">

JesusLopezCh avatar Aug 20 '14 18:08 JesusLopezCh

How is it not in the DOM? What is it?

juliemr avatar Aug 20 '14 23:08 juliemr

Hi , did anyone find a solution for this problem?

sharath7kashyap avatar Apr 25 '19 11:04 sharath7kashyap