Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
//load correct value
String value="";
if(testData.get("Search Value")==null || testData.get("Search Value").equals("")|| testData.get("Search Value").equalsIgnoreCase("NA") ) {
value=testData.get(stepDetails.get("Field Name"));
}
else
{
value= testData.get("Search Value");
}
//Perform date picker if value is not NULL
if(value.equals(null) || value.equals("")|| value.equalsIgnoreCase("NA") ) {
log.info(value+" is not applicable for this transaction (as per the testData)");
}
System.out.println("In Date picker");
By locator = findByLocator(stepDetails.get("Locator Type"),stepDetails.get("Locator Value"));
System.out.println("Locator value"+stepDetails.get("Locator Type")+stepDetails.get("Locator Value"));
WebElement element= waitForElementToBeClickable(locator,60);
element.click();
System.out.println("Calender Clicked");
String Payment_date = value;
System.out.println("Payment_date"+Payment_date);
Date initDate = new SimpleDateFormat("dd/MM/yyyy").parse(Payment_date);
System.out.println("initDate"+initDate);
SimpleDateFormat formatter1 = new SimpleDateFormat("yyyy-MM-dd");
String parsedDate = formatter1.format(initDate);
System.out.println("Value Date:"+parsedDate);
String locatorDate = stepDetails.get("SupportingElement_1_LocatorValue");
System.out.println(locatorDate);
String LocatorValue=locatorDate.replace("Dummy", parsedDate);
System.out.println(LocatorValue);
By inputDate = findByLocator(stepDetails.get("SupportingElement_1_LocatorType"),LocatorValue);
Boolean isPresent = driver.findElements(inputDate).size() > 0;
if(isPresent == true){
driver.findElement(inputDate).click();
}else{
String secondMonth = stepDetails.get("SupportingElement_2_LocatorValue");
System.out.println(secondMonth);
String secondMonthLocatorValue = secondMonth.replace("Dummy", parsedDate);
System.out.println(secondMonthLocatorValue);
By secondMonthDate = findByLocator(stepDetails.get("SupportingElement_2_LocatorType"),secondMonthLocatorValue);
Boolean isSecondMonthDatePresent = driver.findElements(secondMonthDate).size() > 0;
if(isSecondMonthDatePresent == true){
driver.findElement(secondMonthDate).click();
}else{
By calendarRightArrow = findByLocator(stepDetails.get("SupportingElement_3_LocatorType"),stepDetails.get("SupportingElement_3_LocatorValue"));
driver.findElement(calendarRightArrow).click();
isPresent = driver.findElements(inputDate).size() > 0;
if(isPresent == true){
driver.findElement(inputDate).click();
}
isSecondMonthDatePresent = driver.findElements(secondMonthDate).size() > 0;
if(isSecondMonthDatePresent == true){
driver.findElement(secondMonthDate).click();
}
//Date enterred is not enabled so enterring the default debit/value date & clossing the calendar..
// element.click();
}
}
}
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team