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'm currently creating some test cases with Selenium and I've come across a problem.
I'm creating the test cases for web-tests using Jenkins, Python, Selenium2(webdriver) and Py.test frameworks.
When creating selenium tests using the #{selenium} tag, how do you use complex XPath
Hi I am running jar file after creating test in selenium, on windows. every
I am using Selenium RC and I have a test case creating posts and
What's the best practice fort creating webdriver instances in Selenium-webdriver? Once per test method,
I'd like to use Selenium for creating simple functional tests against Plone add-ons. The
I'm creating tests using Selenium 2 Web Driver with C#.Net. After reading through a
I am creating a Python script with Selenium. I want to run a specific
Creating a google map with store locations within 50 miles of user entered address.

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.