title: Python Selenium - Website Behaves Differently When Ran Headless
body: <p>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?</p>
  <pre><code>from selenium import webdriver
  from selenium.webdriver.chrome.options import Options
  import time
  
  url = 'https://www.glassdoor.com/Job/jobs.htm?suggestCount=0&amp;suggestChosen=false&amp;clickSource=searchBtn&amp;typedKeyword=&amp;locT=C&amp;locId=1147401&amp;jobType=&amp;context=Jobs&amp;sc.keyword=what&amp;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)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/0W41sl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0W41sl.png" alt="Headless" /></a></p>
  <p><a href="https://i.stack.imgur.com/Ax2nll.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ax2nll.png" alt="Normal" /></a></p>