I am currently having an issue developing a date picker for the Hertz website (URL: https://www.hertz.co.za/). My current issues are:
I cannot extract from the calender the month and year unless I use Computer Vision. This is a problem because I need to dynamically compare the month and the year from the calendar to check whether it is the required date.
Also, I cannot select the date dynamically as required
Currently, I am trying to use data scraping to find the possible dates to compare. Any assistance would be highly appreciated.
The field without the date picker open is how you should get the current date it’s set to.
<html app='chrome.exe' title='Hertz Rent A Car | Quality Car Rental | Car Hire South Africa' />
<webctrl id='pickup-date' tag='INPUT' />
And since it’s an input you can probably set the value using the same selector. If not, this is the selector for the month/year in the picker:
<html app='chrome.exe' title='Hertz Rent A Car | Quality Car Rental | Car Hire South Africa' />
<webctrl parentid='pickup-date_root' tag='DIV' parentclass='picker__box' />
So you have it click the right or left arrow until the month/year is what you want. Then this is the selector to click one of the displayed dates:
<html app='chrome.exe' title='Hertz Rent A Car | Quality Car Rental | Car Hire South Africa' />
<webctrl aaname='17' aria-role='gridcell' tag='DIV' idx='1' />
Just replace 17 with a variable containing the number of the date you want to click.