I am using the seleniumIDE
I want a Test Case to go to another location based on a condition (note: the condition part is why I am using javascript and using the if-then plugin is not an option for now). I have found that even javascript{window.location.replace('http://google.com') }
closes my seleniumIDE window and replaces it with google but doesn't affect the actual window where the tests themselves were running. I've replaced the condition itself with 1==1
i.e. true. to be simple
Right now I have:
Command store
Target javascript{if (1==1) {location="dmstaffing-stage.herokuapp.com/users/sign_out"}}
Value ignore_me
The problem right now is that this is closing the the seleniumIDE itself and opening a new window.
How can I change the URL location of the window where tests are running
Using:
this.location.href
gave an unexpected Exceptiondocument.location.href
closed my selenium window and then opened a new window and visited the logout page (but original page in original window still logged in)location.href
also closes my selenium window and open a new window with the logout action