I want to select the second element of "TIPOPARTICIPANTE" dropdown list in the following website with Chrome webdriver:
https://www.rad.cvm.gov.br/ENET/frmConsultaExternaCVM.aspx
I can select the dropdown list, by the following:
from selenium import webdriver
driver = webdriver.Chrome('D:\\chromeDriver\\chromedriver.exe') # caminho onde o chromedriver.exe está
driver.get('https://www.rad.cvm.gov.br/ENET/frmConsultaExternaCVM.aspx')
dropdown_list = driver.find_element_by_css_selector('#s2id_cboTipoParticipante')
dropdown_list.click()
option = driver.find_element_by_css_selector('li:nth-child(2)')
option.click() # este comando gerou um erro 'ElementClickInterceptException'
However, in the last line of this script, I got the following error:
Traceback (most recent call last): File "", line 5, in option2.click() File "C:\Users\Raphael\Anaconda3\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click self._execute(Command.CLICK_ELEMENT) File "C:\Users\Raphael\Anaconda3\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute return self._parent.execute(command, params) File "C:\Users\Raphael\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Users\Raphael\Anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) ElementClickInterceptedException: element click intercepted: Element li class="select2-search-field".../li is not clickable at point (819, 118). Other element would receive the click: div id="select2-drop-mask" class="select2-drop-mask" style=""/div (Session info: chrome=90.0.4430.93)
Can someone, please, help me select the second element ("Companhias Abertas") of this drop-down list?
