unittest学习笔记
File "C:\Program Files\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="floor_1"]/div[2]/div[1]/div/div[2]/div[1]/h5/a"} (Session info: chrome=80.0.3987.132)
今天被这个报错折腾了好几个小时,代码反复改来改去,最后才找到根本原因,原来在unittest中测试用例名称不能以test_add开头

浙公网安备 33010602011771号