Differences between findElement and findElementS method?
--> findElement():
-It does returns SINGLE web element.
- Return type: WebElement
- If it cannot find a web element, it throw - NoSuchElementException
--> findElements():
- Returns a List of WebElements
- Return type: List<WebElement>
function App ()
{
let customDatesStyles = [];
let startDate = moment();
let dates = ["2022-10-17", "2022-10-18"];
for(var i in dates)
{ customDatesStyles.push({
startDate: moment(dates[i]),
dateNameStyle: styles.dateNameStyle,
dateNumberStyle: styles.dateNumberStyle,
// Random color...
dateContainerStyle: { backgroundColor: "green" },
});
}
function change(da)
{ console.log(customDatesStyles[0].startDate);
console.log(da);
console.log(customDatesStyles.findIndex((el)=> el.startDate.format("YYYY-MM-DD") == da.format("YYYY-MM-DD")));
}