I need a custom xpath to select a dynamic date from date picker in webmail. My earlier xpath was - //div[contains(@class, 'ms-FocusZone')]//tr/td[contains(@class, 'datesRight')]/button[@aria-label='$strFullMonthName$'] where $strFullMonthName$ is date Eg. 15, June, 2023.
Now the webmail has changed and I am unable to make the new xpath dynamic. New absolute xpath is -
//div[@id='fluent-default-layer-host']/div[7]/div[1]/div[1]/div[1]/div[1]/div[1]/div[2]/div[2]/div[2]/table[1]/tbody[1]/tr[5]/td[5]/button[1]
Inner HTML -
span aria-hidden="true">15</span
"" [I selected date as 15 June for this example] Outer HTML -
button class="dayButton-427" aria-label="15, June, 2023" type="button" tabindex="-1" data-is-focusable="false">15</button
I would like to have an xpath which I used to have earlier so that I can push any dynamic date of the selected month and the xpath can fill that accordingly.Page Elements