About Selenium with Python... What is the difference between from seleniumbase import Driver (seleniumbase) and from selenium import webdriver (selenium, seleniumwire)?
What is the difference in "use cases"?
I see only constructor difference: seleniumbase Driver is harder to set options, then manipulaton with object are same.
from seleniumbase import Driver
driver = Driver(uc=False, headless=True, proxy=proxy, incognito=None, user_data_dir=None, extension_dir=None, binary_location=None)
from selenium import webdriver as Driver
driver = Driver.Chrome(options=options)
It sounds like you're trying to compare this:
with:
The seleniumbase
driverhas more methods than the regular selenium one. The seleniumbase driver methods also have auto-selector detection, smart waiting, special assertion methods, allow truncated URLs, and support theTAG:contains("TEXT")selector. That means you can do this:There are some other differences, such as the way options are passed. SeleniumBase options are passed as args into the
Driver()definition for theDriver()Manager format (there are many other formats, such asSB(),BaseCase, etc.)SeleniumBase also has a UC Mode option, which has special methods for letting your bots bypass CAPTCHAs that block regular Selenium bots:
Here's a CAPTCHA-bypass example where clicking is required: