Hey im using python selenium to download data from table. But when im want to prepare data i cant select a checkbox 'toggle all'....
im geting on page:
browser.get("http://ift.tt/2n8uAbY")
click 'select columns for table'
browser.find_element_by_xpath('//*[@id="showColsButton"]').click()
and here we are checkbox ;toggle all'...
browser.find_element_by_xpath('//*[@id="selectFieldsList"]/thead/tr[2]/td/input').click()
Realy tryed xpath, css selector....
and here we are html fragment:
<table class="selectFieldsList" id="selectFieldsList">
<thead>
<tr><td colspan="2" align="center">
Select Fields using the Checkboxes<br>
<input type="submit" value="Submit" name="fieldSubmit" id="submitMe" class="submitMe">
</td></tr>
<!-- add a select all option -->
<script language="JavaScript">
function toggle(source) {
checkboxes = document.getElementsByName('selectField');
for(var i=0, n=checkboxes.length;i<n;i++) {
checkboxes[i].checked = source.checked;
}
}
</script>
<tr><td> <input type="checkbox" onclick="toggle(this)"> Toggle All<br> </td></tr>
<tr><td>* = required column</td><td> </td> </tr>
<tr><td> <input type="button" id="entityFieldSelectorToggle" value="Expand All Fields"> </td>
</tr></thead>
<tbody>
Aucun commentaire:
Enregistrer un commentaire