Using Selenium and Chrome, I'm attempting to check a box located within a table. The table contains 2 checkboxes but they act as radio buttons, in that if I click one, the other will uncheck.
I've tried a variety of methods, which include the following:
Const CHECKED_STATE As String = "Ag-icon ag-icon-checkbox-checked" findElementByClassName("ag-selection-checkbox").fireEvent("CHECKED_STATE") findElementbyXPath("//span[@class=ag-icon ag-icon-checkbox-checked'])[1]").Click findElementbyXPath(".//div[@class='ag-body-container']").Click
I'm not sure how to click the checkbox when the HTML code doesn't even have a checkbox type or an Id.
The HTML reads:
<span class="ag-icon-checkbox"> <span class = "ag-icon ag-icon checkbox-checked ag-hidden"> <span class = "ag-icon ag-icon checkbox-unchecked"> <span class = "ag-icon ag-icon checkbox-undeterminate ag-hidden"></span>
When I click on the checkbox, the unchecked and hidden lines of HTML will flip. So I'm guessing it's some sort of event that I have to trigger.