1. If there is a pop up with a cookie warning, dismiss the cookie warning.
2. Use Selenium and Python to login to Instagram automatically using the email and password for your new account. Write your code in the login() method.
Here is the URL: https://www.instagram.com/accounts/login/
3. You will probably encounter some pop ups. These include prompts for saving your login information as well as turning on notifications. To dismiss any pop-ups or cookie warnings that you might encounter, you'll have to take a close look at them.


You'll probably notice that the XPATH and the selectors change every time you access the page! That's because they are dynamically generated on Instagram's side, so each time you visit the page, the elements will be different. How can we get around this problem?
Hint: You'll need to use contains() and text() in your XPATH. For example, to find a button that has the words "Click me" on a page, you can use:
button = driver.find_element(by=By.XPATH, value="//button[contains(text(), 'Click me')]")
Note: Run your program sparingly and also interact with the instagram account as a human. Remember to manually log out while testing your code and don't run your code too often or in quick succession (e.g., 5x in a row) as this may result in triggering Instagram's bot detection and get the account banned.