title: Python selenium webdriver Chrome - Chrome is being controlled by an automated software
body: <p>I am using selenium webdriver and creating a chrome driver instance. When i try to do scroll down and scroll up,I am getting the following error message. Further I can see an error message 'Chrome is being controlled by an automated software'. Its annoying to see this error though I am not able to change any settings in Chrome browser for allowing automation.</p>
  
  <pre><code>from selenium import webdriver
  from selenium.webdriver.common.keys import Keys
  from selenium.webdriver.support import expected_conditions as EC
  from selenium.webdriver.common.by import By
  from selenium.webdriver.support.ui import WebDriverWait as wait
  from selenium.common.exceptions import TimeoutException
  
  from log_util.logger import log as Log
  
  import time
  
  log = Log()
  
  
  class Wiki(object):
      def __init__(self):
          self.link = 'http://wikipedia.org'
          self.path = '/Users/swadhikar_c/Downloads/chromedriver'
          self.driver = webdriver.Chrome(executable_path=self.path)
  
      def open_wiki(self):
          driver = self.driver
          driver.get(self.link)
          return self.wait_for_page_load()
  
      def wait_for_page_load(self, timeout=200):
          is_element_located = EC.presence_of_element_located((By.CLASS_NAME, 'central-featured-logo'))
  
          try:
              wait(self.driver, timeout=int(timeout)).until(is_element_located)
              print("Page loaded successfully")
              time.sleep(5)
          except TimeoutException:
              print("Operation timed out")
              raise
  
          return 1
  
      def scroll_down_up(self):
          driver = self.driver
  
          element = driver.find_element(By.TAG_NAME, 'html')
          element.send_keys(Keys.END)
  
          print("Scrolled down to the end!")
          time.sleep(5)
  
          element.send_keys(Keys.HOME)
  
          print("Scrolled up to the top!")
          time.sleep(5)
  
      def close_driver(self):
          self.driver.quit()
  
  
  if __name__ == '__main__':
      wiki = Wiki()
  
      try:
          if not wiki.open_wiki():
              print("Operation failed")
  
          wiki.scroll_down_up()
  
      finally:
          wiki.close_driver()
  </code></pre>
  
  <p>Error message:</p>
  
  <blockquote>
    <p>/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 /Users/swadhikar_c/pycharm_projects/pyselenium/PySelenium/test/selenium_test.py
    Page loaded successfully
    Traceback (most recent call last):
      File "/Users/swadhikar_c/pycharm_projects/pyselenium/PySelenium/test/selenium_test.py", line 64, in 
        wiki.scroll_down_up()
      File "/Users/swadhikar_c/pycharm_projects/pyselenium/PySelenium/test/selenium_test.py", line 43, in scroll_down_up
        element.send_keys(Keys.END)
      File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webelement.py", line 349, in send_keys
        'value': keys_to_typing(value)})
      File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webelement.py", line 493, in _execute
        return self._parent.execute(command, params)
      File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 249, in execute
        self.error_handler.check_response(response)
      File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 193, in check_response
        raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.WebDriverException: Message: unknown error: cannot focus element
      (Session info: chrome=57.0.2987.133)
      (Driver info: chromedriver=2.29.461585 (0be2cd95f834e9ee7c46bcc7cf405b483f5ae83b),platform=Mac OS X 10.12.4 x86_64)</p>
  </blockquote>
  
  <pre><code>Process finished with exit code 1
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/9WVus.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9WVus.jpg" alt="Chrome Message:"></a></p>