Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
Koushik
Posts : 3
Join date : 2013-11-20

Date Picker in Webdriver? Empty Date Picker in Webdriver?

Wed Nov 20, 2013 8:07 pm
Hi Friends,

I am new to WebDriver, I have an issue ... i.e how to pick the date from the date picker..?  iF anyone faced this kind of issue , plz post
avatar
Koushik
Posts : 3
Join date : 2013-11-20

Date Picker in Webdriver? Empty Re: Date Picker in Webdriver?

Thu Nov 21, 2013 6:35 pm
Issue is Solved.... Very Happy
avatar
Harinadh
Posts : 2
Join date : 2013-11-23

Date Picker in Webdriver? Empty Re: Date Picker in Webdriver?

Sat Nov 23, 2013 3:59 pm
Could you pls post the solution as well, so it will be useful for the users Smile
avatar
Koushik
Posts : 3
Join date : 2013-11-20

Date Picker in Webdriver? Empty Re: Date Picker in Webdriver?

Mon Nov 25, 2013 12:50 pm
This is the Solution for the date picker 

for(int i=3;i<=7;i++){    // rows

for(int j=1;j<7;j++) {  //columns
calDate = driver.findElement(By.xpath(".//*[@id='datepicker']/table/tbody/tr["+i+"]/td["+j+"]")).getText(); 

if(calDate.equals(date)) {  /// date we need to initialize like Sting date=25;
System.out.println("date is " +calDate);
driver.findElement(By.xpath(".//*[@id='datepicker']/table/tbody/tr["+i+"]/td["+j+"]")).click();
avatar
nabhanya.varma
Active particpant
Active particpant
Posts : 13
Join date : 2014-03-02

Date Picker in Webdriver? Empty Re: Date Picker in Webdriver?

Mon Jan 26, 2015 10:18 am
Date picker code completely depends on the Calendar UI. There are Ajax, Jquery and simple HTML calendars.

When working with any Date picker, identifying locators is very important.

Now say there is a calendar which shows previous or next months dates in current month calendar. 

Need to click on current month date is important.
Sponsored content

Date Picker in Webdriver? Empty Re: Date Picker in Webdriver?

Back to top
Permissions in this forum:
You cannot reply to topics in this forum