rtorno Posted May 8, 2014 Share Posted May 8, 2014 I just started using autoit and I need help to click a button with no ID or name in the source code. here's part of the source code of the site: if(report.EnableLoadButton) { $('<button onclick="loadReport(); return false;" class="btn-block btn btn-primary">Load Report</button>').appendTo(buttonDiv); } $('<div class="ui-helper-clearfix" style="clear: both;"/>').appendTo(buttonDiv); var iconList = $('<div class="exportButtons"></div>'); if (report.EnableExcelExport == true) { //$('<button onclick="loadExcel(); return false;" class="reportButton" title="Export Excel">E</button>').appendTo(buttonDiv); var excelItem = $('<button type="button" class="btn btn-default btn-xs" title="Export Excel"><span class="glyphicon glyphicon-download"></span></button>'); var excelButtonText = $('<button type="button" class="btn btn-default btn-block hidden-md hidden-lg" title="Export Excel">Export Excel</button>'); var click = function () { loadExcel(); return false; }; excelItem.click(click); excelButtonText.click(click); iconList.append(excelItem); //buttonDiv.append(excelButtonText); I need to specifically click on the button to Export to Excel. The one with the code <span class="glyphicon glyphicon-download"></span> Sorry, I'm just green in programming. TIA Link to comment Share on other sites More sharing options...
Danp2 Posted May 8, 2014 Share Posted May 8, 2014 What have you tried thus far? You didn't specify, so I assume you intend to use IE. Have a look at the help file entry for _IETagNameGetCollection. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now