Use the --enable-smooth-scrolling
flag with add_argument
:
from selenium import webdriver
# Create Chrome options
options = webdriver.ChromeOptions()
# Enable Smooth Scrolling via command-line switch
options.add_argument("--enable-smooth-scrolling")
# Initialize WebDriver with options
driver = webdriver.Chrome(options=options)
--enable-smooth-scrolling
must be passed using add_argument
not add_experimental_option
, because it's a command-line switch rather than a Chrome experimental option.