i made auto login bot with selenium. its getting data from .txt file and input. my question is : how can i open new tab with new user:pass? for example first line of .txt file is test:test and i want to open new tab with second line of txt ( test2:test2 )
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.wait import WebDriverWait
import time
browser = webdriver.Chrome()
def checker(data):
email = data[0]
password = data[1]
browser.get(
"site name")
browser.find_element_by_id("login-username").send_keys(email)
browser.find_element_by_id("login-password").send_keys(password)
browser.find_element_by_id("login-button").click()
time.sleep(5)
browser.find_element_by_css_selector("._95e9f2bdf9c64702a").click()
combos = open("combo.txt", "r").readlines()
arrange = [lines.replace("\n", "")for lines in combos]
for lines in arrange:
data = lines.split(":")
checker(data)