open chrome and go to reddit.com/user/me in python
Here is the code to achieve the above task:
main.py
from selenium import webdriver
# set path for chromedriver.exedriver = webdriver.Chrome("path/to/chromedriver.exe")
# go to websitedriver.get("https://www.reddit.com")
# find login buttonlogin_button = driver.find_element_by_xpath("//a[@data-click-id='header_login']")
# click on login buttonlogin_button.click()
# find username field and enter the valueusername = driver.find_element_by_id("loginUsername")
username.send_keys("yourusername")
# find password field and enter the valuepassword = driver.find_element_by_id("loginPassword")
password.send_keys("yourpassword")
# submit the formsubmit_button = driver.find_element_by_xpath("//button[@type='submit']")
submit_button.click()
# navigate to user profiledriver.get("https://www.reddit.com/user/me")