title: Python Selenium: Find object attributes using xpath
body: <p>I am new to xpath, trying to get value of the "value" using xpath:</p>
  
  <pre><code>&lt;input type="submit" value="  Search  " class="long searchButton" style="width:190px !important;"&gt;
  </code></pre>
  
  <p>while it is easy to find element by <code>"type="submit"</code> like:</p>
  
  <pre><code>browser.find_elements_by_xpath("//*[@type='submit']")
  </code></pre>
  
  <p>I haven't been able to figure out how to get the values I need, as:</p>
  
  <pre><code>browser.find_elements_by_xpath("//*[@type='submit']/@value")
  </code></pre>
  
  <p>somewhat expectedly gives an error:</p>
  
  <pre><code>expression "//*[@type=\'submit\']/@value" is: [object Attr]. It should be an element
  </code></pre>
  
  <p>Any ideas how to solve this?</p>
  
  <p>EDIT:
  The xpath is correct, but it "returns" an obj attribute and as it is not an element, it is not allowed. I can't find a method like get_attr_by_xpath(), or anything similar.</p>