from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
# Initialize the WebDriver
driver = webdriver.Chrome() # You can replace "Chrome" with the browser
of your choice
try:
# Open the login page
driver.get("https://www.bankofamerica.com/") # Replace
"https://example.com/login" with the actual login page URL
# Find the username and password input fields and fill them with your
credentials
username_input = driver.find_element_by_id("username") # Replace
"username" with the actual ID of the username input field
username_input.send_keys("your_username")
password_input = driver.find_element_by_id("password") # Replace
"password" with the actual ID of the password input field
password_input.send_keys("your_password")
# Submit the login form
login_button =
driver.find_element_by_xpath("//button[contains(text(), 'Log In')]") #
Replace "Login" with the text on the login button
login_button.click()
# Wait for the dashboard page to load (you can adjust the sleep time
as needed)
time.sleep(5) # Wait for 5 seconds to simulate page load
finally:
# Close the browser
driver.quit()
from selenium import webdriver
from selenium.webdriver.common.by import By
import time
import math
# Initialize the WebDriver
driver = webdriver.Chrome() # You can replace "Chrome" with the browser
of your choice
try:
# Open the login page
driver.get("https://www.bankofamerica.com/")
# Find the username input field and fill it with your username
username_input = driver.find_element_by_name("User Id") # Use name
attribute instead of ID
username_input.send_keys("preetixyz")
# Find the password input field and fill it with your password
password_input = driver.find_element_by_name("Password") # Use name
attribute instead of ID
password_input.send_keys("12345678")
# Submit the login form
login_button = driver.find_element_by_id("Log In") # Use ID
attribute for the login button
login_button.click()
# Wait for the dashboard page to load (you can adjust the sleep time
as needed)
time.sleep(5) # Wait for 5 seconds to simulate page load
finally:
# Close the browser
driver.quit()
from selenium import webdriver
from selenium.webdriver.common.by import By
import time
import math
# Initialize the WebDriver
driver = webdriver.Chrome() # You can replace "Chrome" with the browser
of your choice
try:
# Open the login page
driver.get("https://www.bankofamerica.com/")
# Find the username input field and fill it with your username
username_input = driver.find_element_by_name("User Id") # Use name
attribute instead of ID
username_input.send_keys("preetixyz")
# Find the password input field and fill it with your password
password_input = driver.find_element_by_name("Password") # Use name
attribute instead of ID
password_input.send_keys("12345678")
# Submit the login form
login_button = driver.find_element_by_id("Log In") # Use ID
attribute for the login button
login_button.click()
# Wait for the dashboard page to load (you can adjust the sleep time
as needed)
time.sleep(5) # Wait for 5 seconds to simulate page load
finally:
# Close the browser
driver.quit()