I am currently working with seleniumIDE
My goal is to have a Test Case navigate to a different location depending on a condition (please note that I am using JavaScript for this purpose, and cannot use the if-then plugin at the moment). I have tried using
javascript{window.location.replace('http://google.com') }
, but it closes my seleniumIDE window and only opens google in a new tab without affecting the actual window where the tests are being executed. To simplify things, I have set the condition as 1==1
.
Currently, my script looks like this:
Command store
Target javascript{if (1==1) {location="dmstaffing-stage.herokuapp.com/users/sign_out"}}
Value ignore_me
The issue now is that this action closes the seleniumIDE itself and opens a new window.
Is there a way to change the URL of the window where the tests are running?
I've tried using:
this.location.href
resulted in an unexpected Exceptiondocument.location.href
closed my selenium window before opening a new one with the logout page (original page in original window remained logged in)location.href
also closed the selenium window and opened a new window with the logout action