Jump to content
Sign in to follow this  

Need to click a button in a website with no ID and no name in source code

Recommended Posts

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 () {
                return false;

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

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...