title: How to open google-chrome-devtools using Selenium with Toggle Device Toolbar set to a specific device (Example: iPhone X)?
body: <p>My current code is this -</p>
  
  <pre><code>from selenium import webdriver
  from selenium.webdriver.common.action_chains import ActionChains
  from selenium.webdriver.common.keys import Keys
  
  options = webdriver.ChromeOptions()
  mobile_emulation = { "deviceName": "iPhone X" } #Specifying device
  options.add_argument("start-maximized")
  options.add_argument("--auto-open-devtools-for-tabs")
  options.add_experimental_option("mobileEmulation", mobile_emulation) #For mobile
  options.add_experimental_option("excludeSwitches", ["enable-automation"])
  options.add_experimental_option('useAutomationExtension', False)
  driver = webdriver.Chrome(options=options, executable_path=r'/Users/amigo/Documents/pet_projects/selenium/chromedriver')
  driver.get("https://google.com")
  </code></pre>
  
  <p>This opens chrome like so - Note that the <code>Toggle Mobile Device</code> tab (next to <code>Elements</code>) isn't activated, and it opens in responsive mode by default. </p>
  
  <p><a href="https://i.stack.imgur.com/uNbds.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uNbds.png" alt="enter image description here"></a></p>
  
  <p>I intend to open it with a specific device selected, like so -</p>
  
  <p><a href="https://i.stack.imgur.com/8PlTa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8PlTa.png" alt="enter image description here"></a></p>
  
  <p>All suggestions and inputs appreciated! Thank you in advance! </p>