I am writing a script to test a web portal. However, I need to change all protocols to SMB Server for me to conduct my test. I need to make it such that my script will only click on the button to change to SMB Server only when it is present as when it is already in SMB Server mode, the button does not exist.
Right now, I have only coded out the part to click on change to SMB Server mode.
This is my code to click to change to SMB server mode:
driver.find_element_by_id("smb_server").click()
alert=driver.switch_to_alert()
alert.accept()
This is the html after it has changed to SMB server mode:
<span class="table-head">
Current Protocol
</span>