Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c

» Selenium Webdriver
Sat Feb 04, 2017 6:47 pm by soumyamishrav@gmail.com

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Date Picker in Webdriver?

View previous topic View next topic Go down

Date Picker in Webdriver?

Post by Koushik 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

Back to top Go down

Re: Date Picker in Webdriver?

Post by Koushik on Thu Nov 21, 2013 6:35 pm

Issue is Solved.... Very Happy

Koushik

Posts : 3
Join date : 2013-11-20

Back to top Go down

Re: Date Picker in Webdriver?

Post by Harinadh 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

Harinadh

Posts : 2
Join date : 2013-11-23

Back to top Go down

Re: Date Picker in Webdriver?

Post by Koushik 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();

Koushik

Posts : 3
Join date : 2013-11-20

Back to top Go down

Re: Date Picker in Webdriver?

Post by nabhanya.varma 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.

nabhanya.varma
Active particpant
Active particpant

Posts : 13
Join date : 2014-03-02

Back to top Go down

Re: Date Picker in Webdriver?

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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