selenium.common.exceptions.WebDriverException: Message: unknown error: Elementis not click is not clickable at point (395, 553). Other element would receive
the click
selenium点击某元素报错,实际该元素存在于页面
selenium.common.exceptions.WebDriverException: Message: unknown error: Element <iframe src="jptInputInvoiceQuery.do?ssId=JPT&loginId=5B1C3F7EF590AE4CF0F114F7BE51356A80D363F4B5BCD9B18B7ADB6DEA1A17A2&ssoUrl=C8FDE268A4E24C2CCC6E19C529EAA03C1B101B2A7EA3E849504B098F47E83780" id="JPT#JPT_M31_inputInvoiceQuery" style="" cd_frame_id_="47cf27d06fe06f664337f715f67f8e42"></iframe> is not clickable at point (395, 553). Other element would receive
the click: <div id="index-tabs" class="tab-hrs-orange" style="width: 1176px; display: block;">...</div>
如图所示,由于点击下载了文件,chrome自动弹出下载的弹框,将需要点击的“下一页”按钮遮住导致无法点击
遮盖前:
遮盖后:
原始代码:
driver.find_element_by_id('button-1044').click()
改进后代码:
element = driver.find_element_by_id('button-1044')
driver.execute_script('arguments[0].click();', element)