#100DaysOfCode in Python Transcripts
Chapter: Days 73-75: Automate tasks with Selenium
Lecture: Concepts: what did we learn
0:00 Right, let's review what we've learned so far. The most basic example of Selenium, the hello world, so to say. You create a driver object.
0:11 You go to Python.org. You find the search field, named queue. You populated the data and we submit it by hitting return.
0:21 We saw that Selenium actually opens your browser. You see it doing it in real time which is pretty cool. And here we make assertions based
0:35 on the page source that changed after the action. Now we're going to do a more fun and practical example, scraping my Packt account which you see here
0:44 in the logged in state. We retrieve the login URL and loaded user and password from the environment variables and send them to the login form.
0:55 We submitted the form by hitting enter. Then we found the My eBooks link and clicked it to actually go to the my eBooks site you see at the left.
1:06 We identified the HTML that contains the books and did some parsing to get all the titles and their ids. And this is pretty cool to further extend
1:15 to make a download app or whatever. And the second app was the PyBites banner generator which we fully automated using Selenium.
1:25 Again, we logged in with the credentials. We found the corresponding HTML. In this case, we had to populate the form to send data to the server.
1:39 And finally we closed the driver. This led to an automated banner. Awesome because, imagine you have to create like 200 for some campaign.
1:48 Well, with Selenium, it becomes very easy. And now it's your turn. Keep calm and code in Python.