capybara-webkit

Capybara server can't access data created in a spec

不打扰是莪最后的温柔 提交于 2019-12-12 00:58:30
问题 I am running Sinatra, Capybara and RSpec. I am testing javascript interactions with webkit headless browser. I am using factory girl to create data that I need to be present for my test. I then use capybara to perform interactions with my application. During these interactions the data that I created at the start of the test is no longer available. It's created with no issue however when debugging in the controller the database is empty. Why is my database empty in the controller but not in

Integration Testing HTML Special Characters

泄露秘密 提交于 2019-12-11 17:34:05
问题 Kind of a strange one, but in my views I have a tick (✔) and a cross (×) used as links (in lieu of images). Is there any way of finding these elements and testing them using RSpec and Capybara-webkit, or should I try and target say the title attribute instead and ignore this route? My test in question looks like this: context "casting a vote", js: true do before do sign_in user click_link '✔' sleep 0.2 end it { should have_content("Vote cast!") } end The failure message I get is (predictably)

attach_file isn't working the right way with capybara-webkit

回眸只為那壹抹淺笑 提交于 2019-12-11 12:57:39
问题 I'm trying to attach some files to this input: <input type="file" name="image" multiple="" accept="image/*"> My code, that is working when I use selenium driver, is: attach_file('image', File.absolute_path('../pictures/pic1.JPG')) attach_file('image', File.absolute_path('../pictures/pic2.JPG')) attach_file('image', File.absolute_path('../pictures/pic3.JPG')) The problems come when I use capybara-webkit : as the input is hidden and some elements overlaps it, I need to change some css

capybara-webkit (0.8.0) failed to build on window 7

这一生的挚爱 提交于 2019-12-11 10:58:46
问题 I am a newbie. I am trying to build capybara-webkit (0.8.0) with native extensions on window 7. I already installed (path set):RubyMine, Ruby SDK and Gems, Rails, DevKit, Qt, gmake, g++. But I still got the following error msg. Any help is greatly appreciated. $ gem install capybara-webkit -v '0.8.0' Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing capybara-webkit: ERROR: Failed to build gem native extension. c:

Cannot install capybara-webkit gem

跟風遠走 提交于 2019-12-11 05:57:01
问题 This is really a tough one for me. I'm trying to migrate over to Mountain Lion but I get the following when trying to install capybara-webkit. The initial error: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /Users/martinb/.rvm/rubies/ruby-1.9.3-p374/bin/ruby extconf.rb cd src/ && /usr/bin/qmake /Users/martinb/.rvm/gems/ruby-1.9.3-p374/gems/capybara-webkit-0.14.1/src/webkit_server.pro -spec /usr/local/Qt4.7/mkspecs/macx-g++ -o Makefile.webkit_server cd src/

Can't install capybara-webkit in Windows Server 2008 R2 / Windows 7

蹲街弑〆低调 提交于 2019-12-11 05:39:51
问题 I need to run tests in Jenkins which is installed on Windows Server 2008 R2 x64, so the advices to run bundle install without "test" section do not fit here. I NEED to have capybara-webkit be installed in Windows. The error message I'm getting, includes, as always, native extensions: Installing capybara-webkit (0.12.0) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. C:/Ruby193/bin/ruby.exe extconf.rb Gem files will remain installed in C

Error using capybara-webkit (really QtWebKit webkit_server) on MacOS X due to libpng version incompatibility

a 夏天 提交于 2019-12-11 05:19:00
问题 I get the following error when trying to execute any capybara test using the capybara-webkit driver: dyld: Library not loaded: /usr/X11/lib/libpng15.15.dylib Referenced from: /usr/local/Cellar/qt/4.8.0/lib/QtGui.framework/Versions/4/QtGui Reason: Incompatible library version: QtGui requires version 20.0.0 or later, but libpng15.15.dylib provides version 17.0.0 /Users/chris/.rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.9.0/lib/capybara/driver/webkit/browser.rb:200:in initialize': Can't

rails 3.1, capybara-webkit, how to execute javascript inside link?

情到浓时终转凉″ 提交于 2019-12-11 03:13:00
问题 Can I execute a javascript in a link with capybara click_link('next_page') ? The link looks like this: <a onclick="$('#submit_direction').attr('value', '1');$('#quizForm').submit()" id="next_page" href="#">Next Question</a> I read at capybara at github that I can submit a form by click at its submit button like this: click_on('Submit Answer') But, in my case, I need to submit the form using javascript in a link, so, how to test the link that has javascript inside ? isn't click_link('next_page

EOFError, what happen to my minitest selenium test? how to fix it?

大城市里の小女人 提交于 2019-12-11 01:45:17
问题 After my ubuntu updates, my minitest selenium test got an error, saying: EOFError: EOFError: end of file reached and it opens many blank google chrome windows as feature test total count . my Ubuntu 16.04 updates was ( yesterday everything works fine until the system made an update ): Commandline: aptdaemon role='role-commit-packages' sender=':1.105' Upgrade: snap-confine:amd64 (1.0.42-0ubuntu3~16.04.1, 1.0.43-0ubuntu1~16.04.1), google-chrome-stable:amd64 (53.0.2785.143-1, 54.0.2840.59-1),

Launching Capybara-Webkit on a dockerized Rails 5 app

孤人 提交于 2019-12-10 21:11:38
问题 I'm working on a brand new Rails 5 app, and I can't launch Capybara-Webkit. I'm following these indications. My development process includes Docker-Compose, then CircleCI for building the Docker image and sending it to Google Cloud Registry. The $ bundle install is fine, the $ docker build is done, but I can't even launch a spec locally with Webkit. When I launch this command, it hangs out and freeze: $ docker-compose run web xvfb-run -a bundle exec rspec I can't find any many informations