title: Getting text value of a HTML tag through Selenium Web Automation in Python?
body: <p>I am making a reddit bot that will look for certain attributes in comments, use selenium to visit the information website, and use <code>driver.find_element_by...</code> to get the value inside that tag, but it is not working.</p>
  <p>When I use <code>driver.find_element_by_class_name()</code>, this is the data returned:</p>
  <pre><code>&lt;selenium.webdriver.remote.webelement.WebElement (session=&quot;f454dcf92728b9db4de080a27a844bf7&quot;, element=&quot;514bd57d-99d7-4fce-a05d-3fa92f66ad49&quot;)&gt;
  </code></pre>
  <p>when I use <code>driver.find_elements_by_css_selector(&quot;.style-scope.ytd-video-renderer&quot;)</code>, this is returned:</p>
  <pre><code>[
    &lt;selenium.webdriver.remote.webelement.WebElement (session=&quot;43cb953cde81df270260bf769fe081a2&quot;, element=&quot;6b4ee3e2-5e6b-48e2-8ec8-9083bf15baea&quot;)&gt;, 
    &lt;selenium.webdriver.remote.webelement.WebElement (session=&quot;43cb953cde81df270260bf769fe081a2&quot;, ...
  ]
  </code></pre>
  <p>when I use <code>driver.find_elements_by_css_selector(&quot;.style-scope.ytd-video-renderer&quot;)</code>.</p>
  <p>Suppose that this is what I'm trying to locate (The above code returned the above Selenium data for this tag):</p>
  <pre><code>&lt;yt-formatted-string class=&quot;style-scope ytd-video-renderer&quot; aria-label=&quot;Sword Art Online: Alicization Lycoris Opening Full『ReoNa - Scar/let』 by Melodic Star 2 months ago 4 minutes, 18 seconds 837,676 views&quot;&gt;Sword Art Online: Alicization Lycoris Opening Full『ReoNa - Scar/let』&lt;/yt-formatted-string&gt;
  </code></pre>
  <p><strong>What I want</strong></p>
  <p>I want <code>Sword Art Online: Alicization Lycoris Opening Full『ReoNa - Scar/let』</code> returned.</p>
  <p>What could I do?</p>