I'm new to python and selenium and I'm trying to switch between tabs, I've already tried using the normal key commands, ActionChains, and Keys.CONTROL, but it's not working, how would I do this. The program is the following
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
import webbrowser
import time
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
import multiprocessing
driver1 = webdriver.Chrome(executable_path="C:\mydriver\chromedriver")
ar = ['https://google.com', 'https://bing.com']
for page1 in (ar):
driver1.execute_script(f"window.open ('{page1}')")
time.sleep(3)
for x in range (5):
driver1.find_element_by_tag_name('body').send_keys(Keys.CONTROL + Keys.TAB)