Open dunossauro opened 4 years ago
The main idea is to build a wrapper from selenium webdriver classes.
For example, in selenium.webdriver we have all supported browsers
selenium.webdriver
In Tigre namespace, we can use tigre.local
tigre.local
from tigre.local import Firefox # the same code that from selenium.webdriver import Firefox
In the future, we can think about dynamic options. But we can start making a simple wrapper. Something like
from importlib import import_module webdrivers = import_module('selenium.webdriver') def __getattr__(browser_name): try: return getattr(webdrivers, browser_name) except: raise ImportError(f"cannot import name '{browser_name}' from 'tigre.local'")
The main idea is to build a wrapper from selenium webdriver classes.
For example, in
selenium.webdriver
we have all supported browsersIn Tigre namespace, we can use
tigre.local
In the future, we can think about dynamic options. But we can start making a simple wrapper. Something like