My end goal is to click a "download menu" button and in order to get to the button i need to click some optinons before hand. One of the options i am strugling with is this one:
this is what the html looks like when i do an inspect element on the option:
<li class=" "><a href="90" id="15">The Pub</a></li>
when i click on the option "The Pub" the list class becomes active and reveals a download menu button to a pdf which is what i want to click, like so:
<li class="active"><a href="90" id="15">The Pub</a></li>
this is what the selector looks like when i do a copy selector on chrome:
#\31 5
this is what the xpath looks like when i do a copy xpath on chrome:
//*[@id="15"]
i have tried the following and everytime webdriver can not find it:
browser.find_element_by_css_selector("#\31 5")
browser.find_element_by_css_selector(r"#\31 5")
browser.find_element_by_xpath("//*[@id=\"15\"]")
<li class=" "><a href="90" id="15">The Pub</a></li>or<li class="active"><a href="90" id="15">The Pub</a></li>?