Error: "Selenium.common.exceptions.Webdriverexception: Message: Unknown error: Element is not clickable at point"

Asked

Viewed 110 times

2

I’m setting a series of "checkboxes" in a variable lista. Then I run the variable through a loop so that only a few of them are clicked. But when the checkbox is not visible on the screen, Selenium does not click and displays the error. If I scroll until the checkbox appears, I can click (without using the loop, sending the command checkbox[n].click() one by one). When consulting if the element "is_displayed", returns True.

My code (which was working last week!) is:

def DistribuiProcesso():
    distribuir = Select(browser.find_element_by_id('selProNov771230778800100040000000000014')) 
    procuradores = distribuir.options
    for x in range(len(procuradores)):
        for y in range(len(processosAlvo)):
                if processosAlvo[y][2] in procuradores[x].text: #É onde está a informação que define se será ou não selecionado o checkbox!
                    processosAlvo[y][1].click() #É onde está o elemento checkbox.
        executar = browser.find_element_by_id('btnExecutar') #Localizo o botão de executar a tarefa.
        executar.click() #Clico no botão.
        voltar = browser.find_element_by_id('btnVoltar')
        voltar.click()

My question: Some way to "roll" the screen? Keys.DOWN and time.sleep() did not help... or so fix the click somehow? Before it worked even with minimized window!

1 answer

0

I found the solution by putting a line like this:

processosAlvo[y][1].send_keys('\ue007')

It arrow with "Enter" before, and then click.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.