seleniumbase / SeleniumBase

📊 Python's all-in-one framework for web crawling, scraping, testing, and reporting. Supports pytest. UC Mode provides stealth. Includes many tools.
https://seleniumbase.io
MIT License
5k stars 942 forks source link

If specifying an invalid `by`, fail fast, rather than after trying to find an element #3003

Closed mdmintz closed 1 month ago

mdmintz commented 1 month ago

If specifying an invalid by, fail fast, rather than after trying to find an element


These are the valid by options: "css selector", "link text", "partial link text", "name", "xpath", "id", "tag name", and "class name".

By default, SeleniumBase autodetects between "css selector" and "xpath" if the by is not specified.

If people try to specify an invalid by, it should raise an exception right away. (Currently, it tries waiting for the element up to the timeout, and that would eventually fail.)

mdmintz commented 1 month ago

This was resolved in 4.29.7 - https://github.com/seleniumbase/SeleniumBase/releases/tag/v4.29.7