I made a script which auto logins to a website and made a .exe file with pyinstaller. Is there a way to implement the chromedriver into this .exe file, so it doesn't have to be installed when I wanna use my programm on another computer? I don't know if it's necessary, but here's my code:
from selenium import webdriver
import time
try:
chrome_options = webdriver.ChromeOptions()
chrome_options.add_experimental_option("excludeSwitches", ["enable-automation", "--load-extension"])
browser = webdriver.Chrome(executable_path="chromedriver.exe", chrome_options=chrome_options)
browser.maximize_window()
browser.get("http://website.example")
browser.switch_to.frame(browser.find_element_by_xpath("/html/frameset/frame[1]"))
browser.find_element_by_xpath("/html/body/center/table/tbody/tr[5]").click()
time.sleep(0.5)
browser.switch_to.default_content()
browser.switch_to.frame(browser.find_element_by_xpath("/html/frameset/frame[2]"))
browser.find_element_by_xpath("/html/body/p[2]/table/tbody/tr[4]/td[1]/form/input[1]").click()
time.sleep(0.5)
browser.find_element_by_xpath("/html/body/p[2]/table/tbody/tr[4]/td[1]/form/input[1]").send_keys("the password")
browser.find_element_by_xpath("/html/body/p[2]/table/tbody/tr[4]/td[1]/form/input[2]").click()
except:
pass
and I have the chromedriver.exe in the same directory