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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:53:22+00:00 2026-05-21T20:53:22+00:00

I am creating a selenium test and in all the tests I want to

  • 0

I am creating a selenium test and in all the tests I want to simulate the user choosing the date. The problem is when the month changes the possible date selections is limited making it very fragile.

This is my current code:

sel.click("fromdate")
sel.click("//div[@id='dp-popup']/div[3]/table/tbody/tr[2]/td[6]")
sel.click("//div[@id='dp-popup']/div[3]/table/tbody/tr[3]/td[1]")

Is there a way to get around this either creating a function that determines the correct cell to choose or if I should just inject the value into the field ?

  • 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-21T20:53:23+00:00Added an answer on May 21, 2026 at 8:53 pm

    I’m using selenium and jQuery date picker. I’m always using xpath checker in selenium tests to create stable tests.

    Well, this is the path of month name //html/body/div[@id='ui-datepicker-div']/div/div/span[1] and this gives the year //html/body/div[@id='ui-datepicker-div']/div/div/span[2] and this is //html/body/div[@id='ui-datepicker-div']/table/tbody/tr[**week index of month.you can think this is a row in datepicker**]/td[**column index of a datepicker.you can think this is a day of a week**]

    Try to use xpath checker to get locators.
    Hope this helps.

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

Sidebar

Related Questions

I am using Selenium RC and I have a test case creating posts and
When creating selenium tests using the #{selenium} tag, how do you use complex XPath
When creating a web application, and lets say you have a User object denoting
When creating a setup/MSI with Visual Studio is it possible to make a setup
So, I've started to create some Ruby unit tests that use Selenium RC to
I have Selenium running under Cruise Control to test our site once a day.
I have a test suite DLL written in C# that uses Selenium.This is then
Has anyone tried creating end user (potentially online, potentially to be printed) help/documentation out
I'm trying to get Selenium tests to work when they are executed by Hudson,
I am using browsermob and selenium for creating scripts to run on a site.

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.