title: How to copy a text and store it into a variable using Selenium? Python
body: <p>I want to copy a text from a website and store it into a variable so I can add it to a dictionary later. I wanted to know how do I accomplish it?</p>
  
  <p>Here is my source code:</p>
  
  <pre><code>from selenium import webdriver
  
  f = webdriver.Firefox()
  
  f.get("http://hi.com")
  
  g = f.find_element_by_tag_name('h1').getText()
  
  print g 
  </code></pre>