- Koushik
- Posts : 3
Join date : 2013-11-20
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
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?
Thu Nov 21, 2013 6:35 pm
Issue is Solved....
- Harinadh
- Posts : 2
Join date : 2013-11-23
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
- Koushik
- Posts : 3
Join date : 2013-11-20
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();
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.varmaActive particpant
- Posts : 13
Join date : 2014-03-02
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.
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.
- I downloaded and installed Selenium WebDriver Jar files in my Eclipse, but still i am facing issues and couldn't run the webdriver scripsts.
- how to capture and replay date picker in j-querry
- using type command in date picker field
- How to find Date Picker calendar contol using Selenium1.0?
- [SOLVED] Need to add arbitrary number of days to date in date picking fields ...
Permissions in this forum:
You cannot reply to topics in this forum