filmov
tv
How to install Selenium + WebDriver #1 (geckodriver+chromedriver) for a client's automation project
Показать описание
If you need to submit data to a site in input fields, and want to see how to get started, install Selenium and the required webdriver and write your first script then check out the steps involved as I show how to install Selenium, geckodriver, and chromedriver and how to submit data to a web page (in this case : Wikipedia) but the general concept applies to any site.
You need to right click in your browser and find either the 'id' or the 'class' - 'id' is preferable.
You can choose which of the 2 browsers you want to use.
Geckodriver is required if you want to use Firefox, and ChromeDriver is required if you want to use Chrome as the browser to automate.
The versions are up to date as of January 2021...But as time goes by you will need to check your browser and get the matching version of chromedriver OR geckodriver.
Later in the project we will submit data FROM a CSV, and then scrape the response and parse it to get the required text to write BACK to a CSV as per the project brief.
___________ chapters _______________________
0:00 intro
0:34 pip install selenium
1:21 'geckodriver' needs to be in PATH
2:40 downloading 'geckodriver'
5:14 getting 'ChromeDriver'
10:17 submitting search string to wikipedia
13:17 selenium find_element_by_id
_____________________________________________
Visit redandgreen blog for more Tutorials
=========================================
Subscribe to the YouTube Channel
=================================
Follow on Twitter - to get notified of new videos
=================================================
Buy Dr Pi a coffee (or Tea)
Thumbs up yeah? (cos Algos..)
#webscraping #tutorials #python
# ------------------------------- code ------------------------------------#
# python -m pip install selenium #
# install the correct webdriver to match your browser version #
# import webdriver
from selenium import webdriver
import time
# create webdriver object
driver = webdriver.Chrome()
# Web URL
You need to right click in your browser and find either the 'id' or the 'class' - 'id' is preferable.
You can choose which of the 2 browsers you want to use.
Geckodriver is required if you want to use Firefox, and ChromeDriver is required if you want to use Chrome as the browser to automate.
The versions are up to date as of January 2021...But as time goes by you will need to check your browser and get the matching version of chromedriver OR geckodriver.
Later in the project we will submit data FROM a CSV, and then scrape the response and parse it to get the required text to write BACK to a CSV as per the project brief.
___________ chapters _______________________
0:00 intro
0:34 pip install selenium
1:21 'geckodriver' needs to be in PATH
2:40 downloading 'geckodriver'
5:14 getting 'ChromeDriver'
10:17 submitting search string to wikipedia
13:17 selenium find_element_by_id
_____________________________________________
Visit redandgreen blog for more Tutorials
=========================================
Subscribe to the YouTube Channel
=================================
Follow on Twitter - to get notified of new videos
=================================================
Buy Dr Pi a coffee (or Tea)
Thumbs up yeah? (cos Algos..)
#webscraping #tutorials #python
# ------------------------------- code ------------------------------------#
# python -m pip install selenium #
# install the correct webdriver to match your browser version #
# import webdriver
from selenium import webdriver
import time
# create webdriver object
driver = webdriver.Chrome()
# Web URL