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 8302691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:20:53+00:00 2026-06-08T17:20:53+00:00

Using capybara, I am trying to fill in a date. There is a javascript

  • 0

Using capybara, I am trying to fill in a date. There is a javascript date picker on the form. I have tried the following ways to choose it:

find('input[type=date]').focus()
find(:xpath, ".//*[@id='Sdate']")
fill_in('Sdate', :with => '25/07/2555')

However for all of these attempts, I got the exact same error message:

Selenium::WebDriver::Error::UnknownError: '[JavaScript Error: "a is null" {file: "file:///var/folders/ky/r1ft86wd5x9cjq0f3f6tq0600000gn/T/webdriver-profile20120725-41019-m72bh5/extensions/fxdriver@googlecode.com/components/command_processor.js" line: 5813}]' when calling method: [nsICommandProcessor::execute]

The html I am trying to fill in:

<input id="Sdate" type="text" readonly="" value="" size="10" name="Sdate">
<img align="absmiddle" onclick="return showCalendar('Sdate', 'dd/mm/yy');" style="cursor:pointer" src="../images/calendar_s.gif">

I am using Selenium webdriver on Firefox with Capybara 1.1.2 in a Rails 3.2.6 task.

What am I missing?

  • 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-06-08T17:20:54+00:00Added an answer on June 8, 2026 at 5:20 pm

    I have the same setup and I was able to select box with this line:

    select 'May', from: 'date_select_1'
    

    where ‘May’ is a value which you want select from list and the *data_select_1* is ID of HTML tag from which you want select the value.

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

Sidebar

Related Questions

I'm using RSpec/Capybara as my test suite. I have some javascript that dynamically appends
Im using Capybara & I am trying to find some xpath that may or
I'm trying to get some RSpec examples working with Capybara using the javascript driver
I'm trying to implement a request spec using Capybara, RSpec and JS (using Webkit).
I'm trying to test a presenter method using a Capybara RSpec matcher. Lets say
I am trying to test a sinatra app using minitest and capybara but get
I'm using capybara-webkit to test integration with a third party website (I need javascript).
I am using Ruby on Rails 3.2.2, cucumber-rails-1.3.0, rspec-rails-2.8.1, capybara-1.1.2 and factory_girl-2.6.3. I have
I'm also using Capybara. I have a bunch of test cases.. and two of
I'm writing some automated tests using Capybara/RSpec, I choose/configure the driver by using this

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.