Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara

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


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