Python - Getting Started With Selenium WebDriver on Ubuntu

preview_player
Показать описание
How to write Selenium Python WebDriver to automate Website using browser?

How to Use Selenium with Python: Complete Tutorial

On Ubuntu systems, this will install pip (and dependencies) and then install the Selenium Python bindings from PyPI

sudo apt-get install python-pip

sudo pip install selenium

Go to the geckodriver releases page. Find the latest version of the driver for your platform and download it. For example:

Extract the file with:

tar -xvzf geckodriver*
Make it executable:

chmod +x geckodriver
Add the driver to your PATH so other tools can find it:

export PATH=$PATH:/path-to-extracted-file/geckodriver

After the installation, the following code should work:

#!/usr/bin/env python

from selenium import webdriver

browser = webdriver.Firefox()
Рекомендации по теме
Комментарии
Автор

Use description if ur not able to see in the screen

nitinsurange
visit shbcf.ru