How to fetch data id of Button control using selenium

Forums HTMLHow to fetch data id of Button control using selenium
Staff asked 2 years ago

I have a button control on a web page as

<button class="btn btn-mini download-attachment pull-right width100px margin-bottom-1px" type="button" data-id="48156"><i class="icon-download"></i>&nbsp;Download</button>

I want to get the data-id associated with it. I am using selenium. Please suggest how can i fetch the data-id of this button control.

Subscribe

Select Categories