Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Scraping Data From the Web!
You have completed Scraping Data From the Web!
Preview
Web scraping doesn't have to entirely be about scraping data for processing. Web scraping tools can be used to test websites as well.
- Testing in Python
- Introduction to Selenium
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
Testing your code is a great
development practice to get into.
0:00
Writing a unit test, and
0:02
combining them with a web scraper,
can be a powerful tool for testing a site.
0:03
You can check to make sure that
a page's title is as expected,
0:08
or that all of the content resides in
an element with a specific CSS class.
0:11
If you need a refresher
on testing in Python,
0:17
check the teacher's notes for
some great resources.
0:20
Let's head back to our sample site, and
0:24
use unit tests to make sure it has
the elements that we expected it to have.
0:25
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up