lundi 18 février 2019

how to save checkbox value after page load in selenium

How can I save the state of checked checkboxes and POST the value of those checkboxes after a page load With the below mentioned code I click on a checkbox but after clicking on calculate button my page loads and the checkbox gets unchecked.

Selenium Webdriver This is my code driver.findElement(By.id("F1372B03C0090002_01082008__ctl2_F1372B03C0090002_01082008C2")).click();

This is the Html form for checkbox

INPUT onclick="document.all('hdnIsValueChanged').value=1; if (F1372B03C0090002_01082008__ctl2_HiddenBox_F1372B03C0090002.value==0) {F1372B03C0090002_01082008__ctl2_HiddenBox_F1372B03C0090002.value=1;};" id=F1372B03C0090002_01082008__ctl2_F1372B03C0090002_01082008C2 CHECKED type=checkbox value="" name=F1372B03C0090002_01082008:_ctl2:F1372B03C0090002_01082008C2




Aucun commentaire:

Enregistrer un commentaire