Showing posts with label py. Show all posts
Showing posts with label py. Show all posts

Thursday, 29 June 2017

First selenium programme with python

prerequisites:

1.python software
2.install selenium over python
3.download chrome driver
4.IDE for python code: pycharm


FacebookTest.py

from selenium import webdriver
driver = webdriver.Chrome("C:/forSelenium/chromedriver.exe")
driver.get("http://www.facebook.com")

Installing selenium client libraries over python


To write a simple selenium programme in python, we need selenium to be added over python ( this is entirely different when you compare with java with selenium )

Here you go

1. open command window in python installation location. ( if not found search for pip.exe then you can easily find out the location)

2. pip.exe install -U selenium





Thats all .

other option:
open command window
C:\Users\Owner\AppData\Local\Programs\Python\Python36-32\Scripts\pip.exe install -U slenium