Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

func.py里的go_to_simso(driver)函数中的driver.find_element_by_id('all').click()报错 #32

Open
SMACY2017 opened this issue Oct 26, 2021 · 4 comments

Comments

@SMACY2017
Copy link

完整报错信息如下

环境检查通过

DevTools listening on ws://127.0.0.1:54967/devtools/browser/7f104549-c65e-44d0-bff5-7ced32eed9f2
Driver Launched

读取到1份配置文件

||第1个学生备案||
门户登陆中...
[1026/120453.418:INFO:CONSOLE(84)] "pascalprecht.translate.$translateSanitization: No sanitization strategy has been configured. This can have serious security implications. See http://angular-translate.github.io/docs/#/guide/19_security for details.", source: https://portal.pku.edu.cn/portal2017/js/angular.min.js (84)
[1026/120454.771:INFO:CONSOLE(84)] "pascalprecht.translate.$translateSanitization: No sanitization strategy has been configured. This can have serious security implications. See http://angular-translate.github.io/docs/#/guide/19_security for details.", source: https://portal.pku.edu.cn/portal2017/js/angular.min.js (84)
门户登录成功!

Traceback (most recent call last):
File "main.py", line 68, in
go('config.ini')
File "main.py", line 38, in go
run(driver_pjs, userName, password, campus, reason, destination, track,
File "C:\Users\shim\Desktop\WORKSPACE\PKUAutoSubmit-main\PKUAutoSubmit-main\func.py", line 245, in run
go_to_application_out(driver)
File "C:\Users\shim\Desktop\WORKSPACE\PKUAutoSubmit-main\PKUAutoSubmit-main\func.py", line 57, in go_to_application_out
go_to_simso(driver)
File "C:\Users\shim\Desktop\WORKSPACE\PKUAutoSubmit-main\PKUAutoSubmit-main\func.py", line 46, in go_to_simso
driver.find_element_by_id('all').click()
File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click
self._execute(Command.CLICK_ELEMENT)
File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\webelement.py", line 693, in _execute
return self._parent.execute(command, params)
File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 418, in execute
self.error_handler.check_response(response)
File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 243, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element ... is not clickable at point (1141, 459). Other element would receive the click:


(Session info: headless chrome=95.0.4638.54)
Stacktrace:
Backtrace:
Ordinal0 [0x00DEBDE3+2473443]
Ordinal0 [0x00D86661+2057825]
Ordinal0 [0x00C92438+1057848]
Ordinal0 [0x00CC27B9+1255353]
Ordinal0 [0x00CC0AE0+1247968]
Ordinal0 [0x00CBE8AD+1239213]
Ordinal0 [0x00CBD701+1234689]
Ordinal0 [0x00CB3567+1193319]
Ordinal0 [0x00CD56E3+1332963]
Ordinal0 [0x00CB3386+1192838]
Ordinal0 [0x00CD57CA+1333194]
Ordinal0 [0x00CE4ABF+1395391]
Ordinal0 [0x00CD55AB+1332651]
Ordinal0 [0x00CB2104+1188100]
Ordinal0 [0x00CB2F59+1191769]
GetHandleVerifier [0x00F72266+1549718]
GetHandleVerifier [0x0101D4A7+2250711]
GetHandleVerifier [0x00E7718B+521403]
GetHandleVerifier [0x00E76229+517465]
Ordinal0 [0x00D8B79D+2078621]
Ordinal0 [0x00D8FB58+2095960]
Ordinal0 [0x00D8FC92+2096274]
Ordinal0 [0x00D99541+2135361]
BaseThreadInitThunk [0x767CFA29+25]
RtlGetAppContainerNamedObjectPath [0x77407A9E+286]
RtlGetAppContainerNamedObjectPath [0x77407A6E+238]

@SMACY2017
Copy link
Author

参考https://blog.csdn.net/please_fix_/article/details/104949016

driver.find_element_by_id('all').click()

替换为

element1 = driver.find_element_by_id('all')
driver.execute_script("arguments[0].click();", element1)


可以正常运行
感谢学长!!!

@SMACY2017
Copy link
Author

已知的是windows和linux上都可能会出现这个问题

@LaanChae
Copy link

已知的是windows和linux上都可能会出现这个问题

经测试,mac上也会出现此问题,按2楼所示方法替换方法后可以解决。谢谢!

@Bruuuuuuce
Copy link
Owner

感谢issue,已进行修改

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants