I'm using Webdriver to perform all the UI actions. I want to download an excel file on Click operation of a WebElement. The below is the html code of the application.
<span class="excel ExcelLink" onclick="document.expForm.submit();">Download Excel</span>
I'm getting error has this WebElement doesn't have any 'href' attribute present in this. Hence I can't use the "HttpClient" to retrieve the file. how to download in this file in java / javascript?
Kindly suggest.