I am new at Python and i was just trying to write a code to open new tabs in the browser.So i searched for some ways to do that and i came across this process.But though it works nicely in the youtube videos mine simply doesnt work.It only just opens a new window and goes to google.com.But it does not press the ctr+t to open a new tab. I dont know why cause it doesnt even show any error in the python shell. Was hoping someone could help me with this and tell me what is wrong with my code.Thank you
#! python3
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
browser=webdriver.Firefox()
browser.get('http://www.google.com')
elm=browser.find_element_by_tag_name('body').send_keys(Keys.CONTROL+'t')
time.sleep(2)
browser.find_element_by_tag_name('body').send_keys(Keys.CONTROL+Keys.PAGE_DOWN)