Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

when two fields have same ng model how to write it's value of send key?

I have two fields with same ng-model like:

input field 1 type=text ng-model=text.abc

input field 2 type-text ng-model-text.abc

for the first input field 1 I can write

 var input = element(by.model('text.abc'));

 input.sendKeys('Team1');

what should I write for the input field 2 that the value not concatenate with input field 1?

like image 614
Iqra Shahid Avatar asked Jan 29 '26 22:01

Iqra Shahid


1 Answers

I suggest that you try by this way :

var input = element.all(by.model('text.abc'));

 input.get(0).sendKeys('Team1');
 input.get(1).sendKeys('Team2');
like image 138
Emna Ayadi Avatar answered Jan 31 '26 20:01

Emna Ayadi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!