headzoo / surf

Stateful programmatic web browsing in Go.
MIT License
1.48k stars 159 forks source link

Added Form.ClickByValue method #31

Closed joshuamorris3 closed 8 years ago

joshuamorris3 commented 8 years ago

When a form has more than one button with the same name, use the value to determine which button to click. For example:

<input type="submit" name="submit" value="submitted1" />
<input type="submit" name="submit" value="submitted2" />

Normally the first button found would be clicked. Now with ClickByValue you can specify the button to click by it's name and value attribute values.