1. Inside the follow() method find all the follow buttons in the modal (popup) and click on each of them in turn. Add a 1 second delay between each click, so you can seem more human. e.g.

2. Sometimes, you'll encounter an account that you have already followed, in this case, when you press on the button it will generate a popup asking if you want to unfollow that person e.g.

2. When this happens the follow button is hidden under the popup and you will get a ElementClickInterceptedException  if you try to continue clicking on the follow button. Handle this exception and when it occurs, simply click on the "Cancel" button to dismiss the popup and continue to follow other people. e.g.


SOLUTION to part 5


Here is the solution to the challenge all in one place:

Completed Code for the entire project

Note, Instagram will update it's website. So the CSS Selectors and XPATH may change.