Skip to content
This repository has been archived by the owner on Sep 5, 2022. It is now read-only.

Selenium Assignment

Ryan Dailey edited this page May 16, 2017 · 1 revision

What is Selenium?

Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. Through Selenium Python API you can access all functionalities of Selenium WebDriver in an intuitive way. Selenium Python bindings provide a convenient API to access Selenium WebDrivers like Firefox, Ie, Chrome, Remote etc. The current supported Python versions are 2.7, 3.5 and above. Why do we need to use selenium?

CAM2 is a project which relies on the network cameras. In order to get images from them, we need to find cameras and add them into our database. The information we need is the country, city and GPS information. We are dealing with thousands of cameras and of course we can get these information manually but obviously it is not an efficient way. With Selenium, we can easily store these information into a file. It works on almost every website and you can extract any information from the website easily.

How to install selenium?

pip install selenium

Read Getting Started With Selenium

Selenium problem:

  1. Open this link, you will see a live video stream at Times Square.

1-timessquare

  1. Scroll down and you can find a map indicates the location of this camera.

2-map

  1. Right click on the map and select ‘inspect element’

3-mapinspect

  1. You will find the GPS information of this camera in the red box area.

4-camerainspect

Assignment:

a) Read the Selenium wiki page first.

b) Use Selenium to find this GPS information and store it into an external file called GPS_info.txt