1

I'm using selenium and I tried to import the option module from selenium in python:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

and I get this error:

Traceback (most recent call last):
  File "C:\Users\GHIE\Desktop\jeahx\kests\test2.pyw", line 2, in <module>
    from selenium.webdriver.chrome.options import Options
ImportError: No module named options

from the way I see it the selenium that I have has no module named "Options" but why? any Idea how could I fix this? I'm on windows 7 and python 2.7 thanks

dave mozart
  • 31
  • 2
  • 7

1 Answers1

3

It seems to me that maybe you do not have everything installed. Maybe check this path:

/usr/lib/python/dist-packages/selenium

And make sure all the classes are in there somewhere. If not, try uninstalling (assuming you are using pip):

$ sudo pip uninstall selenium

And then reinstall.

$ sudo pip install selenium

Now try again.

from selenium.webdriver.chrome.options import Options

If that does not work, check the documentation.

https://pypi.python.org/pypi/selenium

PyDever
  • 100
  • 2
  • 10
  • thanks for replying, but seems it still is the same – dave mozart Nov 12 '17 at 01:42
  • Check now. Try that. – PyDever Nov 12 '17 at 01:45
  • Hi, I still did not try uninstalling it but I tried to navigate to the selenium folder and it just contains folders and two "dll" files, is it okay? this is the directory that I checked "C:\Python27\selenium\webdriver\ie" that "ie" folder contains two folder named "win32" and "x64" and they both contain one "dll" file each – dave mozart Nov 12 '17 at 01:49
  • Did it work bro? – PyDever Nov 12 '17 at 03:27
  • Delete "C:/Python27/selenium". Then reinstall. It sounds like your install failed somehow. Have you used it successfully before now?? I am here and checking your response every 10 mins. So reply whenever. Also, a up vote wouldn't kill me ;) – PyDever Nov 12 '17 at 03:29
  • sorry, the connection just blown out, I deleted the folder and reinstalled again using pip and it says something like "requirements already satisfied" and hey I tried to upvote and it says "I need 15 reputation" I only have 11 right now sorry bro – dave mozart Nov 12 '17 at 03:53
  • To address the issue: did you use the pip uninstall command as well? It is still in pips cache. That's why. Uninstall with pip then try. As for the up vote, thanks lol I forgot about thst. Just go answer questions and ask questions a lot and you get 21 like me!! Good luck. Still available for any further questions regarding this issue. – PyDever Nov 12 '17 at 06:22
  • I uninstalled it now, and when I tried to install it again it says something like "can't find the version......." I'll try to download it again – dave mozart Nov 12 '17 at 06:30
  • It worked!!!!!!! I downloaded the 3.7.0 tar gz the options is with me now thanks,,,,,,,,,,,, @AllAmericanProgrammer – dave mozart Nov 12 '17 at 06:35
  • Yup. God luck. Glad I could help. – PyDever Nov 12 '17 at 16:46