I'm using selenium in python 3.8 and write a code to control chromedriver. The problem is there are too many tabs, almost 10 tabs, are opening when I call driver.get() They are really useless tabs and I only want to open one single tab with a browser. What's the problem with my code? Is there any solution?
Here is my code :
from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--disable-dev-shm-usage")
chrome_options.add_argument("--log-level=3")
chrome_options.add_experimental_option('excludeSwitches',['enable-logging'])
chrome_options.add_argument("'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64)'")
driver = webdriver.Chrome("c:\chromedriver.exe", options=chrome_options)
driver.get('http://google.com')