{"action":"created","issue":{"url":"https://api.github.com/repos/angular/protractor/issues/2019","labels_url":"https://api.github.com/repos/angular/protractor/issues/2019/labels{/name}","comments_url":"https://api.github.com/repos/angular/protractor/issues/2019/comments","events_url":"https://api.github.com/repos/angular/protractor/issues/2019/events","html_url":"https://github.com/angular/protractor/issues/2019","id":67280920,"number":2019,"title":"sendKeys() only passes partial value","user":{"login":"kleinerroemer","id":1167354,"avatar_url":"https://avatars.githubusercontent.com/u/1167354?v=3","gravatar_id":"","url":"https://api.github.com/users/kleinerroemer","html_url":"https://github.com/kleinerroemer","followers_url":"https://api.github.com/users/kleinerroemer/followers","following_url":"https://api.github.com/users/kleinerroemer/following{/other_user}","gists_url":"https://api.github.com/users/kleinerroemer/gists{/gist_id}","starred_url":"https://api.github.com/users/kleinerroemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kleinerroemer/subscriptions","organizations_url":"https://api.github.com/users/kleinerroemer/orgs","repos_url":"https://api.github.com/users/kleinerroemer/repos","events_url":"https://api.github.com/users/kleinerroemer/events{/privacy}","received_events_url":"https://api.github.com/users/kleinerroemer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/protractor/labels/needs:%20more%20info","name":"needs: more info","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-09T04:54:46Z","updated_at":"2015-04-13T04:40:35Z","closed_at":null,"body":"After upgrading to protractor 2.0 my login tests started failing.\r\n\r\nIn my PO I use the following function to handle input values:\r\n\r\n```javascript\r\n\tfunction _input(parentElement, binding, value) {\r\n\t\tvar field = parentElement.element(by.model(binding)).element(by.css(\"input\"));\r\n\t\tif (value === undefined)\r\n\t\t\treturn field.getAttribute('value');\r\n\t\telse\r\n\t\t\treturn field.clear().then(function() {\r\n\t\t\t\treturn field.sendKeys(value);\r\n\t\t\t});\r\n\t}\r\n```\r\nI found out that sendKeys only passes the first part of the value (always with a different length, sometimes one character sometimes n-1). Even if I make a conditional wait for the input to contain the whole value, the condition never gets fullfilled. It seems like sendKeys randomly stops sending keys from the value."},"comment":{"url":"https://api.github.com/repos/angular/protractor/issues/comments/92205544","html_url":"https://github.com/angular/protractor/issues/2019#issuecomment-92205544","issue_url":"https://api.github.com/repos/angular/protractor/issues/2019","id":92205544,"user":{"login":"kleinerroemer","id":1167354,"avatar_url":"https://avatars.githubusercontent.com/u/1167354?v=3","gravatar_id":"","url":"https://api.github.com/users/kleinerroemer","html_url":"https://github.com/kleinerroemer","followers_url":"https://api.github.com/users/kleinerroemer/followers","following_url":"https://api.github.com/users/kleinerroemer/following{/other_user}","gists_url":"https://api.github.com/users/kleinerroemer/gists{/gist_id}","starred_url":"https://api.github.com/users/kleinerroemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kleinerroemer/subscriptions","organizations_url":"https://api.github.com/users/kleinerroemer/orgs","repos_url":"https://api.github.com/users/kleinerroemer/repos","events_url":"https://api.github.com/users/kleinerroemer/events{/privacy}","received_events_url":"https://api.github.com/users/kleinerroemer/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T04:40:35Z","updated_at":"2015-04-13T04:40:35Z","body":"my keyboard layout is set to german but switching to english layout didn't change anything. sendKeys always skips the keys at a different point. I don't use remote display.\r\n\r\nI doubt that the bug is in my method, since it worked just fine before upgrading. My current workaround looks like this:\r\n\r\n```\r\n\tfunction _completeInput(field, value) {\r\n\t\treturn field.getAttribute('value').then(function(v) {\r\n\t\t\tif (v.length < value.length) {\r\n\t\t\t\treturn field.sendKeys(value.substring(v.length, value.length)).then(function() {\r\n\t\t\t\t\treturn _completeInput(field, value);\r\n\t\t\t\t});\r\n\t\t\t}\t\r\n\t\t});\r\n\t}\r\n```\r\n\r\n"}}