{"action":"created","issue":{"url":"https://api.github.com/repos/ariya/phantomjs/issues/11515","repository_url":"https://api.github.com/repos/ariya/phantomjs","labels_url":"https://api.github.com/repos/ariya/phantomjs/issues/11515/labels{/name}","comments_url":"https://api.github.com/repos/ariya/phantomjs/issues/11515/comments","events_url":"https://api.github.com/repos/ariya/phantomjs/issues/11515/events","html_url":"https://github.com/ariya/phantomjs/issues/11515","id":17312222,"number":11515,"title":"File upload using Watir Webdriver and PhantomJS in Ruby 2.0 doesn't work.","user":{"login":"Konstantinusz","id":5106852,"avatar_url":"https://avatars.githubusercontent.com/u/5106852?v=3","gravatar_id":"","url":"https://api.github.com/users/Konstantinusz","html_url":"https://github.com/Konstantinusz","followers_url":"https://api.github.com/users/Konstantinusz/followers","following_url":"https://api.github.com/users/Konstantinusz/following{/other_user}","gists_url":"https://api.github.com/users/Konstantinusz/gists{/gist_id}","starred_url":"https://api.github.com/users/Konstantinusz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Konstantinusz/subscriptions","organizations_url":"https://api.github.com/users/Konstantinusz/orgs","repos_url":"https://api.github.com/users/Konstantinusz/repos","events_url":"https://api.github.com/users/Konstantinusz/events{/privacy}","received_events_url":"https://api.github.com/users/Konstantinusz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2013-07-28T13:55:55Z","updated_at":"2016-09-09T14:50:27Z","closed_at":"2016-09-09T14:50:27Z","body":"I am trying to upload an image file using Ruby 2.0, Watir-Webdriver, and PhantomJS, my code:\r\n\r\n```ruby\r\nrequire 'watir-webdriver'\r\nfname=\"/home/walaki/jgyol1.jpg\"\r\nb = Watir::Browser.new :phantomjs\r\nb.goto \"http://www.imagebam.com/login\"\r\nb.text_field(:name, \"nick\").value=\"myusername\"\r\nb.text_field(:name, \"pw\").value=\"mypassword\"\r\nb.link(:text,\"LOGIN\").click\r\nb.goto \"http://www.imagebam.com/basic-upload\"\r\nb.file_field(:name => \"file[]\",:index => 1).set(fname)\r\nb.link(:text,\"UPLOAD NOW!\").click\r\n```\r\nWhen I issue the last click I always got an error message: \r\n\r\n```\r\nEOFError: end of file reached\r\nfrom /usr/lib/ruby/2.0.0/net/protocol.rb:153:in `read_nonblock'\r\n```\r\n\r\nHowever when I start headless Firefox browser using the \"headless\" gem, everything works fine:\r\n\r\n```ruby\r\nrequire 'watir-webdriver'\r\nrequire 'headless'\r\nfname=\"/home/walaki/jgyol1.jpg\"\r\nheadless = Headless.new\r\nheadless.start\r\nb = Watir::Browser.start 'http://www.imagebam.com/login'\r\nb.text_field(:name, \"nick\").value=\"myusername\"\r\nb.text_field(:name, \"pw\").value=\"mypassword\"\r\nb.link(:text,\"LOGIN\").click\r\nb.goto \"http://www.imagebam.com/basic-upload\"\r\nb.file_field(:name => \"file[]\",:index => 1).set(fname)\r\nb.link(:text,\"UPLOAD NOW!\").click\r\n```\r\n\r\nWhat can I do to make PhantomJS file upload with Watir Webdriver work?"},"comment":{"url":"https://api.github.com/repos/ariya/phantomjs/issues/comments/245936043","html_url":"https://github.com/ariya/phantomjs/issues/11515#issuecomment-245936043","issue_url":"https://api.github.com/repos/ariya/phantomjs/issues/11515","id":245936043,"user":{"login":"Vitallium","id":1894248,"avatar_url":"https://avatars.githubusercontent.com/u/1894248?v=3","gravatar_id":"","url":"https://api.github.com/users/Vitallium","html_url":"https://github.com/Vitallium","followers_url":"https://api.github.com/users/Vitallium/followers","following_url":"https://api.github.com/users/Vitallium/following{/other_user}","gists_url":"https://api.github.com/users/Vitallium/gists{/gist_id}","starred_url":"https://api.github.com/users/Vitallium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vitallium/subscriptions","organizations_url":"https://api.github.com/users/Vitallium/orgs","repos_url":"https://api.github.com/users/Vitallium/repos","events_url":"https://api.github.com/users/Vitallium/events{/privacy}","received_events_url":"https://api.github.com/users/Vitallium/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T14:50:27Z","updated_at":"2016-09-09T14:50:27Z","body":"Please upgrade to PhantomJS 2. 1.9.x is no longer supported, and known to have many crasher bugs that are fixed in 2 version."}}
{"actor":{"display_login":"Vitallium"}}