kaliiiiiiiiii / Selenium-Profiles

undetected Selenium using chromedriver and emulation / device profiles
Other
255 stars 29 forks source link

Latest `selenium-driverless` unsupported #119

Open wealthr opened 4 months ago

wealthr commented 4 months ago

I TRIED RUNNING this basic code with the latest Selenium-Driverless and Selenium-Profiles

from selenium_profiles.webdriver import Chrome
from selenium_profiles.profiles import profiles
from selenium_driverless.webdriver import ChromeOptions
from selenium_driverless.types.by import By

profile = profiles.Windows()  # or .Android
options = ChromeOptions()
# options.add_argument("--headless=new")
driver = Chrome(profile, options=options, driverless_options=True)

# get url
driver.get('https://nowsecure.nl#relax')  # test fingerprint

driver.quit()  # Execute on the End!

I GOT TRACE ERROR

Traceback (most recent call last):
  File "C:\Users\alima\PycharmProjects\pythonProject2\main.py", line 9, in <module>
    driver = Chrome(profile, options=options, driverless_options=True)
  File "C:\Users\alima\PycharmProjects\pythonProject2\venv\lib\site-packages\selenium_profiles\webdriver.py", line 109, in __init__
    options_manager = options_handler(options, profile["options"], duplicate_policy=duplicate_policy,
  File "C:\Users\alima\PycharmProjects\pythonProject2\venv\lib\site-packages\selenium_profiles\scripts\profiles.py", line 234, in __init__
    self.to_capabilities = self.Options.to_capabilities
AttributeError: 'Options' object has no attribute 'to_capabilities'
Exception ignored in: <function Chrome.__del__ at 0x000002817F995D80>
Traceback (most recent call last):
  File "C:\Users\alima\PycharmProjects\pythonProject2\venv\lib\site-packages\selenium_driverless\webdriver.py", line 860, in __del__
    if self._started:
  File "C:\Users\alima\PycharmProjects\pythonProject2\venv\lib\site-packages\selenium_driverless\sync\webdriver.py", line 28, in __getattribute__
    res = super().__getattribute__(item)
AttributeError: 'Chrome' object has no attribute '_started'
kaliiiiiiiiii commented 4 months ago

I'll deprecate the use of selenium-driverless with selenium-profiles.

callaars commented 1 week ago

Why are you deprecating it, is there better ways of doing this?

kaliiiiiiiiii commented 1 week ago

Why are you deprecating it, is there better ways of doing this?

Nope, but applying profiles currently just is detectable anywhere & keeping support for driverless therefore just misses the point