breuerfelix / chromedriver-py

chromedriver self updated binaries for all platforms
https://pypi.org/project/chromedriver-py/
Apache License 2.0
50 stars 16 forks source link

Example code fails #19

Closed cramik closed 2 years ago

cramik commented 2 years ago

Directly copied and ran example code using Python 3.10.2,

C:\Users\Cramik\Desktop>python test4.py Traceback (most recent call last): File "C:\Users\Cramik\Desktop\test4.py", line 4, in <module> service_object = Service(binary_path) NameError: name 'Service' is not defined

cramik commented 2 years ago

oh, just checked. Looks similar to https://github.com/googleworkspace/python-samples/issues/49#issue-377112546

different code is given in the replies though that defines service, so no clue

breuerfelix commented 2 years ago

the problem here is not the binary_path but the Service() object / function you try to use. This has nothing to do with the library but with the code that uses the binary path :)

dlutsch commented 2 years ago

@breuerfelix I have the same issue. The Service() object is used in your example code but not defined, so I'm unsure of the type of object I need to be passing.

breuerfelix commented 2 years ago

uff this is true, now i realised! @lundstrj you update the docs, would you mind fixing the import aswell ? :) otherwhise i am going to have a look at it

lundstrj commented 2 years ago

Hello, I can take a stab at it =)

lundstrj commented 2 years ago

Sorry about the delay. Here is a little PR to resolve this issue in the example code in readme.md

https://github.com/breuerfelix/chromedriver-py/pull/20

breuerfelix commented 2 years ago

thanks about that :)