How to install Selenium for Python and C#

后端 未结 2 1732
野趣味
野趣味 2021-01-24 14:39

I\'m struggling to follow the directions for installing Selenium on a windows machine and I need it for both Python 7.5 and C# platforms.

I ran the command :



        
相关标签:
2条回答
  • 2021-01-24 14:58

    Have you tried this Python 3: ImportError "No Module named Setuptools" ?

    According to this post, it might work even better with easy_install. Couldn't install pip and selenium in windows7

    0 讨论(0)
  • 2021-01-24 15:18

    Windows 7:

    1. Install PyCharm education Edition IDE with Python 2.7 (JetBrains: https://www.jetbrains.com/pycharm-educational/)
    2. Setup easy install (windows - simplified)
        a. download ez.setup.py (https://bootstrap.pypa.io/ez_setup.py) from 'https://pypi.python.org/pypi/setuptools'
        b. move ez.setup.py to C:\Python27\
        c. open cmd prompt
        d. cd C:\Python27\
        e. C:\Python27\python.exe ez.setup.py install
    3. Setup selenium webdriver for python
        a. Download selenium source code from pypi : selenium-2.45.0.tar.gz from https://pypi.python.org/pypi/selenium
        b. unzip it using 7Z software
        c. open cmd prompt
        d. cd to selenium-2.45.0 unzipped directory
        e. C:\Python27\python.exe setup.py install
    4. Test selenium webdriver for python
        a. Open PyCharm IDE
        b. create a new python file with the following contents:
    
            from selenium import webdriver
            browser=webdriver.Firefox()
            browser.get('http://seleniumhq.org/')
    
        c. Run the python script
        d. Firefox browser will open and navigate to the intended website
    5. Done!
    
    0 讨论(0)
提交回复
热议问题