I'm trying to click the label below.
Label html:
<div class="is-inline-block">
<input id="entradas-checkbox-condiciones" type="checkbox" class="switch is-rounded is-small">
<label style="padding-left:1rem;">
I've tried clicking the label with this code:
WebDriverWait = wait
label1 = wait(self.driver, 10).until(EC.presence_of_all_elements_located((By.XPATH, "//*[@class = 'is-inline-block']")))[3]
label1.find_element_by_xpath('//label[style="padding-left:1rem;"]').click()
But i get the following error:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element:
Can somebody help me with the code? Thanks in advance.