- ...
if | !selenium.isChecked("Patency")
waitForElementPresent | name=Patency
click | name=Patency
waitForValue | name=Patency | on
endIf
, . , , , . - , -, NAME ID. , , , XPATH CSS, , [xpath ], / .
In the event that your flag does not have any code changes on the web page or for some reason you cannot use either ID or NAME, then you will do something like this:
storeValue | xpath=//input[@id="Evidence_of_Obstruction"][@name="Patency"] | isBoxChecked
if | storedVars['isBoxChecked']=='on'
goto | NEXT_TASK
else
waitForElementPresent | xpath=//input[@id="Evidence_of_Obstruction"][@name="Patency"]
click | xpath=//input[@id="Evidence_of_Obstruction"][@name="Patency"]
waitForValue | xpath=//input[@id="Evidence_of_Obstruction"][@name="Patency"] | on
endIf
label | NEXT_TASK
This code uses the Selenium IDE identification flags as unverified (off) or marked (on). You can save the state of the flag and determine what to do with the flag, if anything, based on its current state. Hope this helps you or someone else who is facing this issue.
source
share