I want to run the code twice at the same to save time. I am a beginner and I was doing some research on that and get the word multithreading and heard about pytest library but I have no idea how to do that and even I couldn't found the example code. Please help me! I am waiting for your answer
import selenium
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from shutil import which
import time
import pandas as pd
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.common.exceptions import TimeoutException
Links = []
chrome_path = which('chromedriver')
driver = webdriver.Chrome(executable_path=chrome_path)
driver.maximize_window()
driver.get('https://www.google.com')
text = driver.find_element_by_xpath('//input[@class="gLFyf gsfi"]')
text.send_keys('Hello')
driver.find_element_by_xpath('//div[@class="FPdoLc tfB0Bf"]//input[1]').click()
time.sleep(3)
driver.close()
I want to run twice at same time? Anybody help me