Web自动化与爬虫

Selenium

pip install pytest allure-pytest selenium

selenium ide

使用edge浏览器安装Selenium IDE扩展

Selenium IDE - Microsoft Edge Addons

常见问题

selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: stale element not found

解决方案:等待页面稳定,使用显式等待

selenium.common.exceptions.ElementClickInterceptedException: Message: Element is not clickable at point (1120,161) because another element

obscures it

解决方案: 显式等待