Skip to content

Commit

Permalink
add better checks to radios
Browse files Browse the repository at this point in the history
Signed-off-by: Perry Melange <[email protected]>
  • Loading branch information
pmelange committed Feb 19, 2025
1 parent ee14dba commit 067b1f0
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions test/wizard-tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,23 +268,34 @@ def click_next(browser):

# set ip-adresses
sleep(2)
radio0 = browser.find_element(by=By.NAME, value="cbid.ffwizard.1.meship_radio0")
dhcp = browser.find_element(by=By.NAME, value="cbid.ffwizard.1.dhcpmesh")

radio0.send_keys(configs.get("radio0"))
try:
radio0 = browser.find_element(by=By.NAME, value="cbid.ffwizard.1.meship_radio0")
radio0.send_keys(configs.get("radio0"))
except Exception:
print("There was no radio0 in LuCI-Wizard, Therefore radio0-IP-Address not set.")
radio0 = None

#dhcp = browser.find_element(by=By.NAME, value="cbid.ffwizard.1.dhcpmesh")

# radio1 is not present on all routers
try:
radio1 = browser.find_element(by=By.NAME, value="cbid.ffwizard.1.meship_radio1")
radio1.send_keys(configs.get("radio1"))
except Exception:
print("There was no radio1 in LuCI-Wizard. Therefore radio1-IP-Adress not set.")
radio1 = None

dhcp = browser.find_element(by=By.NAME, value="cbid.ffwizard.1.dhcpmesh")
dhcp.send_keys(configs.get("dhcp"))

# configure mesh mode ad-hoc
if args.adhoc:
browser.find_element_by_id("cbid.ffwizard.1.mode_radio0-adhoc").click

if radio0 not None:
browser.find_element_by_id("cbid.ffwizard.1.mode_radio0-adhoc").click
if radio1 not None:
browser.find_element_by_id("cbid.ffwizard.1.mode_radio1-adhoc").click

browser.save_screenshot("05_ipaddr.png")
click_next(browser)

Expand Down

0 comments on commit 067b1f0

Please sign in to comment.