{"action":"created","issue":{"url":"https://api.github.com/repos/angular/protractor/issues/1959","labels_url":"https://api.github.com/repos/angular/protractor/issues/1959/labels{/name}","comments_url":"https://api.github.com/repos/angular/protractor/issues/1959/comments","events_url":"https://api.github.com/repos/angular/protractor/issues/1959/events","html_url":"https://github.com/angular/protractor/issues/1959","id":63633763,"number":1959,"title":"setFileDectector unable to set remote file detector","user":{"login":"jlin412","id":1145485,"avatar_url":"https://avatars.githubusercontent.com/u/1145485?v=3","gravatar_id":"","url":"https://api.github.com/users/jlin412","html_url":"https://github.com/jlin412","followers_url":"https://api.github.com/users/jlin412/followers","following_url":"https://api.github.com/users/jlin412/following{/other_user}","gists_url":"https://api.github.com/users/jlin412/gists{/gist_id}","starred_url":"https://api.github.com/users/jlin412/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlin412/subscriptions","organizations_url":"https://api.github.com/users/jlin412/orgs","repos_url":"https://api.github.com/users/jlin412/repos","events_url":"https://api.github.com/users/jlin412/events{/privacy}","received_events_url":"https://api.github.com/users/jlin412/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/protractor/labels/status:%20needs%20more%20info","name":"status: needs more info","color":"bfd4f2"},{"url":"https://api.github.com/repos/angular/protractor/labels/WebDriver%20issue/feature","name":"WebDriver issue/feature","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-03-23T06:02:39Z","updated_at":"2015-12-10T19:49:29Z","closed_at":null,"body":"I upgrade to 2.0.0 to test browser.setFileDetector()\r\nIt is working locally with browser.setFileDectector(browser.FileDectector);\r\nHowever, it is not working with remote selenium server.\r\nI try browser.setFileDectector(browser.remote.FileDectector);\r\nIt seems that selenium-webdriver/remote is not exposed from protractor.\r\nAccording to upload_test.js,\r\nhttps://github.com/SeleniumHQ/selenium/blob/baa16a551fb8d57f4a176b2f49c7af633dba2893/javascript/node/selenium-webdriver/test/upload_test.js\r\nWe should do something like driver.setFileDetector(new remote.FileDetector);\r\nso I tried\r\n``` javascript\r\n    var absolutePath = path.resolve(__dirname, filePath);\r\n    var remote = require('../../../../node_modules/protractor/node_modules/selenium-webdriver/remote');\r\n    browser.setFileDetector(new remote.FileDetector);\r\n    $('input[type=\"file\"]').sendKeys(absolutePath);\r\n```\r\nBut I got UnknownError: invalid code lengths set\r\n\r\n      From: Task: WebElement.sendKeys()"},"comment":{"url":"https://api.github.com/repos/angular/protractor/issues/comments/163731249","html_url":"https://github.com/angular/protractor/issues/1959#issuecomment-163731249","issue_url":"https://api.github.com/repos/angular/protractor/issues/1959","id":163731249,"user":{"login":"JemiloII","id":5192788,"avatar_url":"https://avatars.githubusercontent.com/u/5192788?v=3","gravatar_id":"","url":"https://api.github.com/users/JemiloII","html_url":"https://github.com/JemiloII","followers_url":"https://api.github.com/users/JemiloII/followers","following_url":"https://api.github.com/users/JemiloII/following{/other_user}","gists_url":"https://api.github.com/users/JemiloII/gists{/gist_id}","starred_url":"https://api.github.com/users/JemiloII/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JemiloII/subscriptions","organizations_url":"https://api.github.com/users/JemiloII/orgs","repos_url":"https://api.github.com/users/JemiloII/repos","events_url":"https://api.github.com/users/JemiloII/events{/privacy}","received_events_url":"https://api.github.com/users/JemiloII/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T19:49:29Z","updated_at":"2015-12-10T19:49:29Z","body":"Ahh alright, thanks~"}}