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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:56:38+00:00 2026-05-27T01:56:38+00:00

I am trying to automate a Jquery UI slider using watir-webdriver and ruby but

  • 0

I am trying to automate a Jquery UI slider using watir-webdriver and ruby but am having no luck. I want to be able to manipulate the slider to either increase or decrease the value. I have searched everywhere and asked a few of my colleagues but no one has an answer. I am attaching a piece of HTML code for the slider. Any help would be much appreciated.

URL link: http://www.whatcar.com/new-car-deals/ (price range slider)

I haven’t done any coding for the slider as I have no idea how to go about it. If I could be set on the right path that would be fantastic. Also it seems the HTML code doesn’t seem to be showing on the question I am asking.

  • 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-27T01:56:39+00:00Added an answer on May 27, 2026 at 1:56 am

    it’s a Jquery widget that appears (looking at the scripts) to respond to key presses once one of the handles has been clicked on. the handles are link objects, inside a pair of divs, the outer one has the ID value ‘slider-range’

    You should be able to address them via browser.div(:id => 'slider-range').link(:index => n) where n = 0 for the lefthand one and n=1 for the right hand one.

    Try this manually first

    • Click on the left handle for the slider
    • Then press arrow keys on the keyboard.. it will move 1K(pounds) up or down with each right or left arrow keypress.
    • Once you have moved it right, click the Home key and it should reset to its min value
    • repeat above for the right handle but reset it to far right using the End key.

    In theory you could fire a click event at the right slider to get focus, then fire off some keypress events to first set it far right (end) followed by enough left arrows to move it down to the top value you want.

    Repeat for the left handle, setting it to the left end with the home key, and moving it with right arrow keypresses

    I don’t have the time right now to experiment further and develop an exact script, but I think you could probably create two little functions even that took an upper and lower range value and did the required number of keypresses to move the lower up from 5K to the right amount, and the upper down from 100k

    Note that this thing is very very event driven, it responds (at least when watching the dev tools while playing with it) to being moused over, mousedown, mouseup, etc.. if using click does not work to ‘get the attention’ of the control so it will respond to keypresses, try using the onmousedown event instead.

    Using the code from your answer, to move the left slider to 12K I’d try

    browser.div(:id => 'slider-range').link(:index => 0).click  #make sure it has focus
    browser.div(:id => 'slider-range').link(:index => 0).send_keys :home #set to 5K    
    7.times do
       browser.div(:id => 'slider-range').link(:index => 0).send_keys :arrow_right
    end 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to automate tests on asynchronous requests but I haven't been able
I'm trying to automate a gdb session using the --command flag. I'm trying to
Assuming I'm trying to automate the installation of something on windows and I want
I am trying to automate functional testing of a server using a realistic frequency
I am trying to automate VC++ build via an addIn written using VB.NEt so
I'm trying to automate the build of a project in Delphi 2009. I'm using
I'm trying to automate a password entry but the website in question does not
I am trying to automate my testing procedure using Ant. This is my error:
I'm trying to automate the generation and cleanup of partial classes created using the
I am trying to automate pde tests, using pde-maven-plugin, maven calls, or ant tasks.

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.