Next we would be working on a few simple tests using Python. Once you hit enter, you’ll see that it opens up the Firefox browser and opens up the given url, which is the homepage of Ubuntu.Įt Viola!We have successfully ran the first program using Selenium and Python on a Ubuntu system. Now use the python command to run this script. There are two ways, depending on how you installed the package If you have installed selenium via pip (python) pip install selenium -upgrade If you have installed selenium via the package manager, then do For Python 2. Use Ctrl+Alt+T to open Terminal and browse to the respective directory where you have saved this file. You either have it installed from apt or from pip. > import selenium > help (selenium) Help on package selenium: NAME selenium FILE c:python27libsite-packagesseleniuminit. This should install Selenium on you system. Heres how i checked for the version of selenium in Python. Next, you would need to install Selenium using the pip installed The best way is to first install pip on your system Here is a link which explains how to use Python3 on Ubuntu if you are wondering how to use it :įor installing Selenium in your Ubuntu system, you need to use pip command. Although if you use the python version command in Terminal, it returns a different version, which I am trying to figure out. It comes pre installed with Python 3.4, so you can use Python 3 implementations very easily. Since command line is one of the best features of Linux, so I would try to use command line as much as I can.įirst of all, you don’t need to worry about installing Python on Ubuntu 14.04. So today I’m gonna post how to get started with Selenium, with Python on Ubuntu. And also I have now moved on to Ubuntu 14.04, which is very much cooler than compared to Windows ( no offence windows fans). It is very cool language, easy to work with and a lot of fun. And off late, I have been playing with a little bit of Python. Create Python Environment for Selenium on Ubuntu Now use PIP to install the selenium and webdriver-manager Python modules under the virtual environment. Playing with Selenium is one of my most loved things.
0 Comments
Leave a Reply. |