I'm using watir-webdriver over Selenium Grid2 and I have this issue where the
Grid Master is on Linux and the Slave is on a Windows machine. So when it comes
to uploading files with FileFields, we're using a shared file server. However
because the situation with windows/unix file paths compatibility (unc, \\ vs /
etc) we get issues with the following code:
raise Errno::ENOENT, path unless File.exist?(path)
path = path.gsub(File::SEPARATOR, File::ALT_SEPARATOR) if File::ALT_SEPARATOR
Unix on Grid2 wants to be in unix, but we really want to send a Windows path
So for the moment I've removed these checks/conversions putting the following
in my code. So we can determine exactly what path we want to present.
module Watir
class FileField < Input
def set(path)
self.value = path
end
def value=(path)
assert_exists
@element.send_keys path
end
end
end
ps. Not sure what you want to do with this! (e.g. close whenever) If you have
any suggestions please let me know! Keep up the great work on this project!
Sam
---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-webdriver/issues/175
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development