I try to write a code for login email with website but the browser open but username and password not work fillout the input
def open_browser(self):
# Open the browser processes for each profile directory
url = self.txt_weblink.text()
# Define the path to the Google Chrome executable
chrome_path = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
# Define the first set of custom profile directories
profile_directories_1 = [self.txt_path1.text()]
# Open the browser processes for each profile directory
browser_processes = []
for directory in profile_directories_1:
process = subprocess.Popen(
[chrome_path, directory, url, "--windows=350, 600", "--position=0, 0",
"--start-minimized",
"--webbrowser=3", "--tab=3"])
browser_processes.append(process)
def Login_outlook_subprocess(self):
username = self.txt_email1.text()
password = self.txt_pass1.text()
self.browser.find_element(username='loginfmt').send_keys(username)
time.sleep(3)
field = self.browser.find_element(password='passwd')
field.send_keys(password)
time.sleep(3)
def click_button(self, by: By, value: str):
button = self.browser.find_element(by=by, value=value)
button.click()
time.sleep(3)`your text`
def close_browser(self):
self.browser.stop()
I try to make automatic login outlook email on chrome_path