when i am trying to find element using below xpath i'm getting syntax error,so what could be a reason, i'm following this question but it's not working for me
https://stackoverflow.com/a/58400631/12849200
My Xpath:
dp_month = driver.find_element_by_xpath('//*/td[@aria-label='+month_label+']/div[contains(text(),'+ x_month +')]')
selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: Unable to locate an element with the xpath expression //*/td[@area-label=November 2025]/div[contains(text(),NOV)] because of the following error:
SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//*/td[@area-label=November 2025]/div[contains(text(),NOV)]' is not a valid XPath expression.