I'm having an issue occur when I try to use the if statement with multiple conditions in the Selenium IDE. One of the conditions always seems to get ignored.
Here's my scenario:
if | !selenium.isElementPresent("link=userA") && !selenium.isElementPresent("link=userB")
goto | SETUP_DONE
else
if | selenium.isElementPresent(""link=userA")
clickAndWait | link=userA
clickAndWait | name=deleteuser
clickAndWait | name=deleteuser
endIf
if | selenium.isElementPresent("link=userB")
clickAndWait | link=userB
clickAndWait | name=deleteuser
clickAndWait | name=deleteuser
endIf
label | SETUP_DONE
waitForElementNotPresent | link=userA
waitForElementNotPresent | link=userB
endIf
Basically, my script is suppose to check for the existence of two users. If neither one exists, then then it jumps to the label SETUP_DONE where it will perform some other tests. If either user is detected, then it clicks on the link of the user that's detects, deletes the user('s), and reverifies that neither of the two user names exist.
However, as the code is now, it only verifies userA and the verification of userB is completely ignored. If I change the statement to...
if | !selenium.isElementPresent("link=userA" && "link=userB")
...then it ignores the first user, userA, and checks for userB. I tried using "&" and "and" instead, but those resulted in the script failing. Does anyone know how my syntax is wrong and what it should be? Will I have to create a separate check for each username instead of combining the check on one line of code? Thanks ahead of time.