title: Python — Opening multiple tabs that can be automatically interacted with simultaneously using chrome webdriver
body: <p>I'm using Python to code a Kahoot flooder and need to open a user specified amount of tabs at the same time (bot amount). I also want to be able to interact with all of these tabs simultaneously or in a very short amount of time. Here is my code:</p>
  <pre><code>import time, selenium, Typewriter, random
  from selenium import webdriver
  from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
  from selenium.webdriver.common.by import By
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.support import expected_conditions as EC
  from selenium.common.exceptions import NoSuchElementException
  
  Typewriter.typewriter(&quot;KahootBummer Version 1.0&quot; &quot;\n&quot;)
  botamount = input(&quot;How Many Bots Do You Want?&quot; &quot;\n&quot;)
  botamount = int(botamount)
  pin = input(&quot;Please Enter Game Pin&quot; &quot;\n&quot;)
  pin = int(pin)
  name = input(&quot;Please Enter A Name&quot; &quot;\n&quot;)
  
  for i in range(botamount):
  
      namenum = random.randint(0,2347324)
      namenum = str(namenum)
      name = str(name) + namenum
  
      chrome_options = webdriver.ChromeOptions()
      chrome_options.add_argument(&quot;-incognito&quot;)
      chrome_options.add_argument(&quot;--headless&quot;)
      driver = webdriver.Chrome(executable_path=&quot;C:/Users/boomb/Desktop/Finished Python 
      Programs/chromedriver.exe&quot;,options=chrome_options)
      driver.get(&quot;https://kahoot.it/&quot;)
      time.sleep(2)
  
      pinenter = driver.find_element_by_xpath(&quot;//input[@id='game-input']&quot;)
      pinenter.click()
      pinenter.send_keys(pin)
  
      entergame = driver.find_element_by_xpath(&quot;//button[contains(text(),'Enter')]&quot;)
      entergame.click()
      time.sleep(2)
  
      nameenter = driver.find_element_by_xpath(&quot;//input[@id='nickname']&quot;)
      nameenter.click()
      nameenter.send_keys(name)
  
      okaygo = driver.find_element_by_xpath(&quot;//button[contains(text(),'OK, go!')]&quot;)
      okaygo.click()
  </code></pre>
  <p>Basically I want it to run this loop a set amount of times in a short period of time without having to wait for each loop to finish. Also I am new to coding so sorry for messy code. Thank you!</p>