Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

attach_file broken with selenium-webdriver 2.12.2 #541

Closed
thijsc opened this Issue · 7 comments

5 participants

@thijsc

Calling attach_file in capybara 1.1.1 in combination with selenium-webdriver 2.12.2 fails. In selenium-webdriver 2.10 this was still working correctly.

Stacktrace from my specs:

  1) Upload a file
     Failure/Error: attach_file 'File', File.join(Rails.root, 'spec/images/stub.jpg')
     Selenium::WebDriver::Error::UnhandledError:
       Element cannot contain user-editable text
     # [remote server] resource://fxdriver/modules/atoms.js:831:in `unknown'
     # [remote server] resource://fxdriver/modules/atoms.js:1037:in `unknown'
     # [remote server] resource://fxdriver/modules/atoms.js:7108:in `unknown'
     # [remote server] file:///var/folders/g_/5rn1yvxn46q1dk1n56d1kg2w0000gn/T/webdriver-profile20111114-87624-1mgzhzg/extensions/fxdriver@googlecode.com/components/driver-component.js -> file:///var/folders/g_/5rn1yvxn46q1dk1n56d1kg2w0000gn/T/webdriver-profile20111114-87624-1mgzhzg/extensions/fxdriver@googlecode.com/components/wrappedElement.js:260:in `unknown'
     # [remote server] file:///var/folders/g_/5rn1yvxn46q1dk1n56d1kg2w0000gn/T/webdriver-profile20111114-87624-1mgzhzg/extensions/fxdriver@googlecode.com/components/nsCommandProcessor.js:306:in `unknown'
     # [remote server] file:///var/folders/g_/5rn1yvxn46q1dk1n56d1kg2w0000gn/T/webdriver-profile20111114-87624-1mgzhzg/extensions/fxdriver@googlecode.com/components/nsCommandProcessor.js:320:in `unknown'
     # [remote server] file:///var/folders/g_/5rn1yvxn46q1dk1n56d1kg2w0000gn/T/webdriver-profile20111114-87624-1mgzhzg/extensions/fxdriver@googlecode.com/components/nsCommandProcessor.js:197:in `unknown'
     # (eval):2:in `attach_file'
@jnicklas
Owner

Getting the same error when I run the Capybara test suite. @jarib, any insight on this?

@jarib

Looking.

@jarib

Right. Capybara shouldn't call Element#clear on a file input. We used to silently ignore it, but don't anymore.

@jnicklas jnicklas closed this in 9b689a6
@jnicklas
Owner

Fixed it and just released a new gem.

@thijsc

Just tested it in my project and the issue is fixed, thanks!

@joliss
Collaborator

Well that was quick. ^_^

@dimacus

Thanks guys, you saved me hours of dumb frustration... I <3 you

@nyarly nyarly referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@linedotstar linedotstar referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@satoryu satoryu referenced this issue from a commit in satoryu/capybara
@seenmyfate seenmyfate Correctly infer namespace in task enhancements
Previously, defining a task using the `after` syntax within a namespace
block ignored the namespace, now the following examples are equivalent:

      # within namespace
      namespace :deploy do
        task :my_task do
          #
        end

        after :starting, :my_task
      end

      # outside of namespace
      after 'deploy:starting', 'deploy:my_task'

This resolves #541
a58bb3b
@geb-bot geb-bot referenced this issue in geb/issues
Closed

Cannot set the value of a file input #152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.