how do I get URL with selenium IDE?

Viewed 3656

I have look over the internet and didn't find an answer I am trying to store the URL in a variable. Found couple of answer that didn't work

  1. ${!url} should bring read-only URL of the site
  2. "StoreLocation" should store the URL and that doesn't exist in the IDE
  3. storeEval should store the URL and that doesn't exist in the IDE
2 Answers

For reference, this is what this looks like in the Selenium IDE

enter image description here enter image description here

You can then assert that the result is a given value like so:

enter image description here

There's some more useful info here too - https://www.selenium.dev/selenium-ide/

You should use execute-script command like this:

execute script | return window.location.href; | url

So after execution of this command url variable will store url of page.

Related