I knew and it is working fine also with headless mode on linux(python+selenium), for headless mode
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
browser = webdriver.Chrome(webdriver_manager.chrome.ChromeDriverManager().install(),
chrome_options=chrome_options)
My requirement: Want to run selenium/python script without headless chrome mode(i.e. non-headless) But when i comment or remove line (--headless),
chrome_options = webdriver.ChromeOptions()
#chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
browser = webdriver.Chrome(webdriver_manager.chrome.ChromeDriverManager().install(),
chrome_options=chrome_options)
or even (--no-headless)
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--no-sandbox')
browser = webdriver.Chrome(webdriver_manager.chrome.ChromeDriverManager().install(),
chrome_options=chrome_options)
it gave me error with above (non-headless) change while running python script,
Looking for [chromedriver 84.0.4147.30 linux64] driver in cache
File found in cache by path [/***/drivers/chromedriver/84.0.4147.30/linux64/chromedriver]
Error in UI Test: local variable 'browser' referenced before assignment
Can someone help me to achieve this requirement, if possible in linux?