Setting ion-textarea value in protractor


I’m trying to write some e2e tests for my Ionic app, and attempting to fill out a ion-textarea programatically like so:

var.agendaField = $('ion-textarea.agenda-text-area');
agendaField.sendKeys("Item 1\r\nItem 2\r\nItem 3");

However, I get the following error:

WebDriverError: unknown error: cannot focus element

Can anyone help? I’m tearing my hair out here.

For the benefit of future Googlers (hi!), I ended up clicking on the actual element and then sending keypresses to the browser like so:

var agendaField = $('ion-textarea.agenda-text-area'); => {
  return browser.actions().sendKeys(
    'Item 1', 
    'Item 2', 
   'Item 3'