This repository was archived by the owner on Nov 29, 2018. It is now read-only.
This repository was archived by the owner on Nov 29, 2018. It is now read-only.
When using with PhantomJS file uploading doesn't work #6006
Open
Description
Originally reported on Google Code with ID 6006
Before filing an issue, please read the page at
http://code.google.com/p/selenium/wiki/SeleniumHelp This contains lot of
information about how best to get help, and tells you what we need to know.
Still here? We know that bugs are frustrating and annoying things. We also
know that you've probably spent ages trying to figure out what's wrong. The
more information you give us now, the more likely it is that we'll be able
to help.
What steps will reproduce the problem?
1. my ruby script (using phantomjs, and watir webdriver) navigates to imagebam.com,
and logs in
2. It sets the file input field to an existing file with full path
3. When clicking upload button I got an error message: "EOFError: end of file reached,
from /usr/lib/ruby/2.0.0/net/protocol.rb:153:in `read_nonblock'"
What is the expected output? What do you see instead?
Properly uploading the image file.
Selenium version: 2.33, Watir-Webdriver Ruby gem: 0.6.4
OS: Arch Linux 3.10.1-2-ck
Browser: PhantomJS
Browser version: 1.9.1
Please provide any additional information below. A sample reduced test
case, or a public URL that demonstrates the problem will intrigue our merry
band of Open Source developers far more than nothing at all: they'll be far
more likely to look at your problem if you make it easy for them!
My code:
require 'watir-webdriver'
fname="/home/walaki/jgyol1.jpg"
b = Watir::Browser.new :phantomjs
b.goto "http://www.imagebam.com/login"
b.text_field(:name, "nick").value="myusername"
b.text_field(:name, "pw").value="mypassword"
b.link(:text,"LOGIN").click
b.goto "http://www.imagebam.com/basic-upload"
b.file_field(:name => "file[]",:index => 1).set(fname)
b.link(:text,"UPLOAD NOW!").click
I got error message as above.
Reported by kisbelus
on 2013-07-26 18:29:41