Selenium Webdriver on Windows



Run our sample code and develop your own scripts:

  • 1  Connect to your instance via RDP. See here how.
  • 2a  Python 2

    Open Command Line Interface. Navigate into C:\Users\Administrator\Desktop\Selenium\python2 by
    cd C:\Users\Administrator\Desktop\Selenium\python2
    Run the sample code for Chrome by
    python sample-chrome.py
    Run the sample code for Firefox by
    python sample-firefox.py
    You can watch how Chrome/Firefox execute the sample script. After a successful run you see:


    Open the directory Desktop -> Selenium -> python2 to see taken screenshots. Edit the script by right-click -> Open with Notepad++. When you are done, save the file. Switch back to the Command Prompt window and run changed scripts again by
    python sample-chrome.py


  • 2b  Python 3

    Open Command Line Interface. Navigate into C:\Users\Administrator\Desktop\Selenium\python3 by
    cd C:\Users\Administrator\Desktop\Selenium\python3
    Run the sample code for Chrome by
    python3 sample-chrome.py
    Run the sample code for Firefox by
    python3 sample-firefox.py
    You can watch how Chrome/Firefox execute the sample script. After a successful run you see:


    Open the directory Desktop -> Selenium -> python3 to see taken screenshots. Edit the script by right-click -> Open with Notepad++. When you are done, save the file. Switch back to the Command Prompt window and run changed scripts again by
    python3 sample-firefox.py


  • 2c  Java

    Open Eclipse Java by double-click on its Desktop icon, then click on 'Launch'. Click on the green 'Run' icon.


    When you make changes, save the file. By clicking on 'Run', the file gets compiled automatically before executing the script.
  • 2d  Javascript

    Open Command Line Interface. Navigate into C:\Users\Administrator\Desktop\Selenium\nodejs by
    cd C:\Users\Administrator\Desktop\Selenium\nodejs
    Run the sample code for Chrome by
    node chrome-sample.js
    Run the sample code for Firefox by
    node firefox-sample.js
    You can watch how Chrome/Firefox execute the sample script:


    By opening the folder Desktop -> Selenium -> nodejs you see taken screenshots. Edit the script by right-click -> Open with Notepad++. When you are done, save the file. Switch back to the Command Prompt window and run changed scripts again by
    node chrome-sample.js