Date picker script for the below scenario ?

7 Answer(s)

Hi Anu,

Here’s the solution…

…….

 

WebElement dateWidget = driver.findElement(By.id("ui-datepicker-div"));
Thread.sleep(1000);
Select month = new Select(driver.findElement(By.className("ui-datepicker-month")));
 month.selectByValue("0");
Thread.sleep(1000);
 Select year = new Select(driver.findElement(By.className("ui-datepicker-year")));
 year.selectByValue("2018");
Thread.sleep(1000);
 List<WebElement> rows=dateWidget.findElements(By.tagName("th"));
 List<WebElement> columns=dateWidget.findElements(By.tagName("td"));
for (WebElement cell: columns)
 {
 //Select 17th Date
 if (cell.getText().equals("17"))
 {
 cell.findElement(By.linkText("17")).click();
 break;
 }
 }

 

……………….

Paso007 Train Answered on September 4, 2014.

Thank you Paso007

on October 13, 2014.
Add Comment

d.findElement(By.xpath(“//input[@name=’ merchantSignup.signingAuthorityEffectiveDate‘]”)).click();

 

d.findElement(By.xpath(“//*[@id=’ui-datepicker-div’]/table/tbody/tr[1]/td[3]/a”)).click();

yogesh77 Default Answered on September 4, 2014.
Add Comment

Can you please share the link of the above site?

Thanks,
Vishal S

vishaalcbe Doctor Answered on September 3, 2014.
Add Comment

http://www.infibeam.com/MerchantSignup.action

Paso007 Train Answered on September 3, 2014.
Add Comment

Hey Buddy,

Sorry this is blocked for me.

Thanks,
Vishal S

vishaalcbe Doctor Answered on September 3, 2014.
Add Comment

Hi Vishal,

It’s ok.. I made it successfully.. Thank you.

Paso007 Train Answered on September 3, 2014.

Please use comments for extra information and comments.

Regards,
Lakshay Sharma

on September 12, 2014.
Add Comment

Hi Paso,

Can you share the solution?

anu17 Doctor Answered on September 3, 2014.

Please use comments for extra information and comments.

Regards,
Lakshay Sharma

on September 12, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.