I'm very new to python and was trying to learn how to make a script that clicks certain buttons on a website.
From my research, it seems that Selenium is a great option. This is the code I've written thus far:
from selenium import webdriver
import time
browser = webdriver.Chrome()
browser.get('URL')
time.sleep(0.7)
atc = browser.find_element_by_xpath('XPATH')
atc.click()
time.sleep(0.3)
check = browser.find_element_by_xpath('XPATH')
check.click()
The program runs fine, and I've removed some specific code
I need Selenium to boot up Chrome but not a new instance of Chrome. I need the script to work on a specific website that needs to be already logged in, so basically through my Chrome Profile.
Question:
Is there a way to get around this problem? From what I know (which is little) the problem arrises from the webdriver.Chrome
Is there a way to bypass the webdriver.Chrome
and use just the find_element_by_xpath
? Thats really the only reason I need to use this. I don't need to boot up a link from Selenium, just have the script find a button and click it
Thank you!
Edit: Would a simple solution be to have my login already in place and have the script run on a separate window so it can bypass the "Please Sign In" page?