I am trying to click on a field, while running automated test but I get this error:
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <input id="artistNominee010" type="checkbox" class="rock-artist-checkbox"> is not clickable at point (967, 601). Other element would receive the click: <span class="rock-artist-toggle-icon"></span>
Here is my line of code that tries to access the attribute:
select_nominee = WebDriverWait(driver, 2).until(EC.presence_of_element_located((By.ID, 'artistNominee010'))).click()
This is the DOM structure of the page:
<input id="artistNominee010" type="checkbox" class="rock-artist-checkbox">
<label class="rock-artist-label" for="artistNominee010">
<span class="rock-artist-photo-wrap">
<img class="rock-artist-photo" alt="" src="/images/artist-photos/nominee010.jpg"></span>
<span class="rock-desktop-hide rock-artist-name">John Doe</span>
<span class="rock-accessible-text">select John Doe</span>
<span class="rock-artist-toggle-icon"></span></label>
From the site, this is the element that is clickable, but i can't select it directly as other elements contain the same class name with different nominees, the id is unique.
<span class="rock-accessible-text">select John Doe</span>
is there anyway to do something like this:
select_nominee = WebDriverWait(driver, 2).until(EC.presence_of_element_located((By.ID, 'artistNominee010').class('rock-accessible-text')).click()