0

When I try to set the path in a file field using browser.file_field(:name, "upload").set(file_path), the file field is cleared on IE9 after setting the file path.

The same code used to work fine, and I was able to upload the document in IE8.

orde
  • 5,233
  • 6
  • 31
  • 33
user3791
  • 391
  • 2
  • 9
  • I have seen that problem too, but can't remember if i got it fixed or not. There was something really strange happening. If i recall correctly then even if i clicked "save" button manually before filling the path automatically, then it also failed. Just try different approaches to see if you have any luck. – Jarmo Pertman Oct 20 '12 at 14:06
  • Any updates on this issue? (July 9th 2013) We are starting to convert all of our watir-webdriver scripts to use watir-classic for IE9 execution (gem used: watir (4.0.2 x86-mingw32)) Just like the origianal issue reported (user above), our previous scripts execute fine on IE7/IE8, BUT for IE9 however - the file_field is set correctly but cleared out (for whatever reason) when the upload button is clicked... so our file upload test fails. Unfortunately changing the browsers' tool compatibility option is not acceptable/possible (company security policy). Thanks, RJR – SysTest RJR Jul 09 '13 at 15:46

1 Answers1

0

I faced the same problem and came across to this question. I found one easy solution. You can set the compatibility view for the web site you are testing. You can add your web site in Tools --> Compatibility view Settings in IE9. It will work without any problem.

asarvaiya
  • 1
  • 1