I have a unique request here. I am looking for a solution using HttpUrlConnection that can interact with JavaScript directly on a webpage, instead of relying on Selenium as a workaround. Can anyone assist me with this?
The webpage contains a link (hidden by an image) as seen below:
<a .............
onclick="javascript:downLoad('CAMID(\xxx;)/folder[@name=\'test\']/folder[@name=\'test\']
/reportView[@name=\'test\']/output[@name=\'test']',
'spreadsheetML' )" alt="Download" ></a>
When I click on this link, a pop-up window appears and I can then click on the save
button.
Is there a way to programmatically download this file using Java without interacting with the pop-up?
Currently, I am using Selenium and Java's Robot object to simulate clicking the save
button. However, I believe there should be a direct method to download the file without these workarounds.