Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union #10

Open
kaliiiiiiiiii opened this issue Jul 13, 2024 · 1 comment
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@kaliiiiiiiiii
Copy link
Contributor

At

if is_windows and not isinstance(self.browser, DriverlessAsyncChrome):
and
if is_windows and not isinstance(browser, (DriverlessSyncChrome, SeleniumChrome)):

On OS:Windows and not having Selenium-Driverless installed, we get:

E       TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union

due to the second argument being a string ( set at

SeleniumChrome: Type["SeleniumChrome"] = "SeleniumChrome" # type: ignore[no-redef]
try:
from selenium_driverless.sync.webdriver import Chrome as DriverlessSyncChrome
from selenium_driverless.webdriver import Chrome as DriverlessAsyncChrome
except ImportError:
DriverlessAsyncChrome: Type["DriverlessAsyncChrome"] = "DriverlessAsyncChrome" # type: ignore[no-redef]
DriverlessSyncChrome: Type["DriverlessSyncChrome"] = "DriverlessSyncChrome" # type: ignore[no-redef]
)

@kaliiiiiiiiii kaliiiiiiiiii added bug Something isn't working help wanted Extra attention is needed labels Jul 13, 2024
@Vinyzu Vinyzu self-assigned this Dec 13, 2024
@mermyly
Copy link

mermyly commented Mar 2, 2025

I also encountered this problem when trying to use the example from the documentation. Have you solved it yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants