paulotarcio paulotarcio - 4 months ago 6
AngularJS Question

Why when I'm using protractor to write a text it doens't work correctly

I have a textarea and I'm trying to write a big text on it.
I'm using:

var ementa = element(by.xpath("//label[. = 'Descrição / Ementa*']/following-sibling::textarea"));
ementa.sendKeys('TESTANDO1-TESTANDO2-TESTANDO3-TESTANDO4-TESTANDO5-TESTANDO6-TESTANDO7-TESTANDO8');


But, when I run the test, the proctractor makes a mess and write something like "T1TRES2". Why? How can I Fix it?

Answer

As you mentioned you are using Angular 2 , there were some issues with sendKeys() in Angular 2 but they are fixed with latest version- Angular 2.0.0-rc.3. for more info you can check out this issue - https://github.com/angular/protractor/issues/3196

Comments