Home > Blockchain >  Selenium with Python not able to fully open the website
Selenium with Python not able to fully open the website

Time:11-13

I have tried the following code and tried to open the website as mentioned:

driver = webdriver.Chrome(r"..\chromedriver_win32\chromedriver.exe")
driver.get("https://example.com")

The website opens with the Chrome Browser but not with the Selenium using Python.

Please let me know what should I do to open the website completely.

CodePudding user response:

You can run it with chrome options. I am able to launch your application with below code:

from time import sleep
from selenium import webdriver

PATH = "chromedriver path"
option = webdriver.ChromeOptions()
option.add_argument('--disable-blink-features=AutomationControlled')
option.add_argument("start-maximized")
option.add_experimental_option(
    "excludeSwitches", ["enable-automation"])
option.add_experimental_option('useAutomationExtension', False)

driver = webdriver.Chrome(PATH, options=option)


url = 'https://example.com'

driver.get(url)
driver.maximize_window()
sleep(20)

output:

output image

  • Related