Share
View previous topicGo downView next topic
Koushik
Posts : 3
Join date : 2013-11-20

Date Picker in Webdriver?

on 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
Koushik
Posts : 3
Join date : 2013-11-20

Re: Date Picker in Webdriver?

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

Re: Date Picker in Webdriver?

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

Re: Date Picker in Webdriver?

on 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();
nabhanya.varma
Active particpant
Active particpant
Posts : 13
Join date : 2014-03-02

Re: Date Picker in Webdriver?

on 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

Re: Date Picker in Webdriver?

View previous topicBack to topView next topic
Permissions in this forum:
You cannot reply to topics in this forum