I want to click this daily tasks link but here id and class name is not unique, My DOM element is:
I tried :
#My Restaurant Configuration MENU
driver.find_element_by_xpath("//a[@class='x-btn name-container x-unselectable x-box-item x-btn-default-small x-noicon x-btn-noicon x-btn-default-small-noicon']//span[contains(text()='My Restaurant Configuration']").click()
print("second sub link")
getting following error:
raise exception_class(message, screen, stacktrace) selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: Unable to locate an element with the xpath expression //a[@class='x-btn name-container x-unselectable x-box-item x-btn-default-small x-noicon x-btn-noicon x-btn-default-small-noicon']//span[contains(text()='My Restaurant Configuration'] because of the following error: SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//a[@class='x-btn name-container x-unselectable x-box-item x-btn-default-small x-noicon x-btn-noicon x-btn-default-small-noicon']//span[contains(text()='Daily Tasks']' is not a valid XPath expression. (Session info: chrome=80.0.3987.163)
