title: Running python Selenium tests on CircleCI
body: <p>I'm trying to run some python selenium tests in the test phase of CircleCI.</p>
  
  <p>My circle.yml looks like this:</p>
  
  <pre><code>machine:
    python:
      version: 2.7.9
    node:
      version: 0.10.34
    java:
      version: oraclejdk8
  dependencies:
    post:
      - pip install selenium
      - wget http://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar
      - java -jar selenium-server-standalone-2.44.0.jar:
          background: true
  test:
    post:
      - python /home/ubuntu/app/tests/tests.py
  ...
  </code></pre>
  
  <p>and tests.py looks like this:</p>
  
  <pre><code>from selenium import webdriver
  
  driver = webdriver.Chrome()
  driver.get('http://127.0.0.1')
  
  print driver.find_element_by_class_name('a-class').text
  </code></pre>
  
  <p>I have two questions:</p>
  
  <p>First off, how to I output data from test.py back to CircleCI's interface (the print statement obviously doesn't work)</p>
  
  <p>Secondly, what's the correct address to use in the <code>driver.get()</code> call, as I get an <code>http://127.0.0.1/ is not available</code> error?</p>
  
  <p>Here's the full traceback:</p>
  
  <pre><code>http://127.0.0.1/ is not available
  Traceback (most recent call last):
    File "/home/ubuntu/app/tests/tests.py", line 11, in &lt;module&gt;
      print driver.find_element_by_class_name('yes-cta').text
    File "/home/ubuntu/virtualenvs/venv-2.7.9/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 378, in find_element_by_class_name
      return self.find_element(by=By.CLASS_NAME, value=name)
    File "/home/ubuntu/virtualenvs/venv-2.7.9/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 712, in find_element
      {'using': by, 'value': value})['value']
    File "/home/ubuntu/virtualenvs/venv-2.7.9/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 201, in execute
      self.error_handler.check_response(response)
    File "/home/ubuntu/virtualenvs/venv-2.7.9/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 193, in check_response
      raise exception_class(message, screen, stacktrace)
  selenium.common.exceptions.NoSuchElementException: Message: no such element
    (Session info: chrome=43.0.2357.130)
  
  (Driver info: chromedriver=2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961),platform=Linux 3.13.0-76-generic x86_64) python /home/ubuntu/app/tests/tests.py returned exit code 1
  </code></pre>