title: Selenium chromedriver: How to open latest email in outlook
body: <p>I am trying to take screenshot of latest email in outlook (OWA) using selenium chromedriver and python code. I am new to selenium so I'm definitely missing how to open element in new window and take screen.</p>
  <p>python version: 3.7
  headless chrome version: 84.0.4147.89</p>
  <p>I am able to login and select latest email. When I try to click() the latest email element it doesnt show any error but when I try to send keys like ENTER to open it in new window, it gives me error saying</p>
  <pre><code>selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
  </code></pre>
  <p>Need inputs as to how I can open the latest email and save it as image.</p>
  <p>Code I've used:</p>
  <pre><code>    chrome_options = Options()
      chrome_options.add_argument(&quot;--headless&quot;)
      chrome_options.add_argument(&quot;--window-size=1920x1080&quot;)
      chrome_options.add_argument(&quot;start-maximized&quot;);
      chrome_options.add_argument(&quot;disable-infobars&quot;)
      chrome_options.add_argument(&quot;--disable-extensions&quot;)
      chrome_driver = os.getcwd() + &quot;/chromedriver&quot;
      driver = webdriver.Chrome(chrome_options=chrome_options, executable_path=chrome_driver)
  
      # login part
      driver.get(&quot;my OWA url&quot;)
      username = driver.find_element_by_id(&quot;username&quot;)
      password = driver.find_element_by_id(&quot;password&quot;)
      username.send_keys(&quot;my user name&quot;)
      password.send_keys(&quot;password here&quot;)
      driver.find_element_by_css_selector(&quot;input.btn&quot;).click()
  
      # To reach to email list and latest email
      latest_email = driver.find_elements_by_id(&quot;vr&quot;)[0]
      latest_email.click()
      #WebDriverWait(driver, 15).until(EC.element_to_be_clickable((By.ID, 'vr')))
      #latest_email.send_keys(Keys.ENTER)
      print(latest_email.is_selected())
      print(latest_email.is_displayed())
      time.sleep(5)
      driver.save_screenshot(&quot;just_to_see.png&quot;)
      driver.close()
  
  </code></pre>
  <p>Above code when executed says element is displayed (true), but false for element is selected. It also shows screen where latest email is selected.</p>
  <p>When I uncomment the send keys and WebDriverWait, then it gives error saying <code>Selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable</code></p>
  <p>I'd tried other options like like move_to_element() and also by clicking on cData class, but unable to get latest email opened.</p>