How to upload a file with watir and IE?
I knew about that problem, and completely forgot! Go to input_elements.rb file in your gems directory, and add the title of the file upload window in your language to POPUP_TITLES
(line 443).
Example:
before
POPUP_TITLES = ['Choose file', 'Choose File to Upload']
after
POPUP_TITLES = ['Choose file', 'Choose File to Upload', 'File upload in my language']
Selecting local files using watir-webdriver
Try using the following function:
@browser.file_field(:id,"upload").set("filepath")
Also, if you are using IE browser then make sure you are using IEDriverServer_Win32_2.33.0 as it works fine on this driver not on latest one.
Related Topics
How Might I Simulate a Private Browsing Experience in Watir? (Selenium)
Keyword Arguments Unpacking (Splat) in Ruby
Handling Iframe with Capybara Ruby
Ruby Dot Parenthesis Call Syntax
Rspec: Should Be (This or That)
Rspec Commandline Variable Input
Cocoon Add Association, How to Limit Number of Associations
Optional Parens in Ruby for Method with Uppercase Start Letter
Why Is This Not a Syntax Error
Ruby What Class Gets a Method When There Is No Explicit Receiver
Ruby Puts Not Outputting in Real Time
Can "Gem Install" Be Configured to Install Executables Outside /Usr/Bin/ by Default
How to Preserve Case with Http.Get