0

I am trying to fix a piece of Java code that has been reliably scraping web data from a particular web page for a few years using the HtmlUnit library and headless browser.

The owner of the web page I'm trying to get data from has recently updated it, and it now contains a Grid produced by Kendo UI.

I am more of a backend developer, and I am unfamiliar with Kendo UI and Javascript frameworks.

I am trying to select this checkbox, but the Kendo UI elements are not behaving like the HTML elements I'm used to scripting for with HtmlUnit.


<th scope="col" role="columnheader" data-field="d2" rowspan="1" data-index="0" id="5f92c0d9-2023-428a-866d-7e62733448cb" class="k-header">
    <center>
        <input type="checkbox" class="checkbox" id="checkALL" onclick="handleCheckALLClick(this);">
    </center>
</th>

Any assistance on how to interact with Kendo UI elements using Java and HtmlUnit would be greatly appreciated.

OnlyDean
  • 1,025
  • 1
  • 13
  • 25
  • That appears to be a checkbox in the header used to select all the visible rows (there may be other rows not displayed due to paging). If you are trying to grab actual data, that would be in a table below the header def's or are you trying to [programatically check the checkbox](https://stackoverflow.com/questions/8206565/check-uncheck-checkbox-with-javascript-jquery-or-vanilla)? – Steve Greene Jan 07 '20 at 20:19
  • @SteveGreene Yes, I am trying to programmatically check the checkbox using Java and HtmlUnit. – OnlyDean Jan 07 '20 at 20:37
  • call click() on the HtmlCheckbox and maybe the update is done async by the javascript try to wait a bit. If this does not help please open an issue at github. – RBRi Jan 08 '20 at 18:44

0 Answers0