I am trying to automate loading and configuring a web page. On this page I am trying to check the state of the checkbox and then click on a it if its unchecked.
HTML code for the page:
<fieldset id="wireless-24" class="left" style="display: block;">
<div class="legend-edit text-orphan">
<legend>2.4 GHz network</legend><span>|</span><span id="edit-wireless-24"><a id="editWireless24Link" href="http://192.168.0.1/ui/1.0.99.162351/dynamic/home.html#">Edit</a></span>
</div>
<div class="row toggle-edit">
<label style="width: 126px;">Network:</label>
<label id="w-radio-enabled-text-24">Disabled</label> <!-- code sets the text to either Enabled or Disabled -->
<div class="cell" id="w-enabled-span-24">
<div class="check-item" style="">
<div><input type="checkbox" id="w-enabled-24" name="radio.band24.settings.isEnabled" class="ui-helper-hidden-accessible"><span class="ui-checkbox"></span></div>
<div><label for="w-enabled-24" class="ui-checkbox">Enabled</label></div>
</div>
</div>
</div>
Network is the field I am trying to click on. I am using selenium and python.
I tried the following:
browser.find_element_by_id("w-radio-enabled-text-24").send_keys("Enabled")
browser.find_element_by_text("Network").click()
send_keys("Enabled")to the radio button?