I want to click or more respectively, expand the "Any time" button. I've tried to locate the element by class_name and xpath. The problem is that the class and xpath are the same for all three 'options'. So, I would like to select and click or expand on that element by using the aria-label. I found a couple of suggestions, but it didn't work for me. Most importantly, I try to do that in python 3. I also tried:
driver.find_element_by_xpath(""" //div*[@aria-label='Any Time'] """).click()
but it doesn't work.
Could anyone please help me? Many thanks in advance!
<div class="hdtb-mn-hd" aria-haspopup="true" role="button" tabindex="0" aria-label="Any country"><div class="mn-hd-txt">Any country</div><span class="mn-dwn-arw"></span></div>
<div class="hdtb-mn-hd" aria-haspopup="true" role="button" tabindex="0" aria-label="Any time"><div class="mn-hd-txt">Any time</div><span class="mn-dwn-arw"></span></div>
<div class="hdtb-mn-hd" aria-haspopup="true" role="button" tabindex="0" aria-label="All results"><div class="mn-hd-txt">All results</div><span class="mn-dwn-arw"></span></div>
Message: unknown error: Element <div class="mn-hd-txt">...</div> is not clickable at point (306, 99). Other element would receive the click: <a class="q qs" href="/search?q=ISIS+OR+IS+OR+%22Islamic+State%22&dcr=0&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjYy56A4OrWAhWFDMAKHVG9BDAQ_AUICygC">...</a>
Any ideas how to solve this problem? Thanks in advance! – Clem