Asaf Shazar
Asaf Shazar

Reputation: 1065

how do I get URL with selenium IDE?

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

Upvotes: 5

Views: 7782

Answers (2)

Tom
Tom

Reputation: 2198

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/

Upvotes: 8

Roslyakova Maria
Roslyakova Maria

Reputation: 446

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.

Upvotes: 3

Related Questions