vendredi 3 janvier 2020

How to define input field (Selector) under condition to exist text in other class in the same div

I'm having trouble defining the field for typing text into

this.requiredField = Selector('input').withAttribute('required');

in a condition where the validation label is

this.requiredLabel = Selector('.form-control-warning').withText('Required field cannot be left blank');

There are in class=”col-10” – see below

enter image description here

I am not interested in such a filed where there is no text Required field cannot be left blank in. form-control-warning enter image description here

I need it because I must type text in each field with a label: 'Required field cannot be left blank" I created sth like this:

while (await epgBoard.requiredLabel.exists)
{

await t.typeText(epgBoard.emptyRequiredField, 'ff')
}

I have no idea how to define such selector

this.emptyRequiredField = find in .col-10 -> input withAtrribute required where . form-control-warning has text Required field cannot be left blank

Could sb help me with this matter?

Aucun commentaire:

Enregistrer un commentaire