Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7187135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:46:44+00:00 2026-05-28T18:46:44+00:00

After installing capybara-webkit, I tried to try a test inside a spec, here is

  • 0

After installing capybara-webkit, I tried to try a test inside a spec, here is my test:

Capybara.default_driver = :webkit

page.execute_script("$('#submit_direction').attr('value', '1');$('#quizForm').submit()")

Then, I get this error:

/home/sam/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:136:
warning: Insecure world writable dir /home/sam/Documents/RoR in PATH,
mode 040777 undefined|0|ReferenceError: Can’t find variable: $

Capybara::Driver::Webkit::WebkitInvalidResponseError: Javascript
failed to execute

Any idea please ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:46:45+00:00Added an answer on May 28, 2026 at 6:46 pm

    I’m guessing the capybara-webkit JS driver is a bit dodgy.

    From the capybara github page:

    For simple expressions, you can return the result of the script. Note
    that this may break with more complicated expressions:

    result = page.evaluate_script(‘4 + 4’);

    However, from the code you have there, it looks like you can do quite a few things with Capybara itself.

    $('#submit_direction').attr('value', '1')
    

    could be replaced with:

    page.find("#submit_direction").set('1')
    

    and

    $('#quizForm').submit()
    

    could be replaced with:

    page.click_on('quizForm')
    

    see the capybara docs on capybara actions

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After installing Test & Performance Tools Platform in Eclipse Ganymede on, whenever I tried
After installing VMware Server I get the following error when I try to access
After installing Oracle XE DB and ODP.NET, i tried to run included scripts to
After installing python 3.1, I cannot print anything. Here is an example: >>> print
After installing SQL Server 2005, I tried to create a new database (command: create
After installing XCode 4 I went to the Organizer window to try to verify
after installing django I tried django-admin.py startproject mysite and that worked, then I got
I tried using hgtk on my machine after installing Tortoise Hg, but the command
After Installing Rails 3, I get the following error regarding Sqlite3 when I try
After installing VS2008, the platform builder mod, and the WM7 aku, VS usually prompts

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.