Grab a button in Splinter (python)


For most of the buttons I try to grab using Splinter, the commands that are on this site ( ) are enough.

However, for this specific button, I can't find a way to grab it.

<button type="submit">Vote</button>

What to do if I can't identify his name or id?


Like your earlier question I answered, it's possible but instead of the find_by_value method use find_by_css , which sets the html element's css selector:

from splinter import Browser

with Browser() as browser:
    browser.visit("url aqui")
    button = browser.find_by_css('button[type="submit"]')[0] # agarramos o button seletor css

You can also 'grab' by your html tag:


Or even by the text:

Scroll to Top