driver.get(
    'http://stackoverflow.com/questions/7794087/running-javascript-in-selenium-using-python'
    )
driver.execute_script(
    "document.getElementsByClassName('comment-user')[0].click()")
Running javascript in Selenium using Python