I have run the following code below twice. Once with the headless argument and once without. I checked the screenshots and the website seems to behave differently when ran headless. The main difference is that the second bar of search criteria does not exist. I have attached the screenshots below. How can I deal with this?
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import time
url = 'https://www.glassdoor.com/Job/jobs.htm?suggestCount=0&suggestChosen=false&clickSource=searchBtn&typedKeyword=&locT=C&locId=1147401&jobType=&context=Jobs&sc.keyword=what&dropdown=0'
chromeoption = Options()
chromeoption.add_argument('--headless')
chromeoption.add_argument('--window-size=1300,700')
browser = webdriver.Chrome(options=chromeoption)
browser.get(url)
time.sleep(5)
browser.save_screenshot(file_location)