Step for obtaining the current page URL

It would be nice to have an easy way to find/save the current webpage url to a variable without resorting to custom javascrip step.

I looked into the Built-in variables section of my project but couldn’t find something similar.

Not sure what a decent solution would be here. A built-in variable might not be the best, because the “current webpage” url is not always the same, but can change constantly.


Maybe a new Action item for the “WINDOW” section?

To give you more context into my scenario and why the assert URL address is not what I need:

  • I go to a webpage

    https://platform.co/product

  • I create a new entity inside the webpage, for example a new product

  • The url changes → it now ends in /product-123456, so it there’s now a uniquely generated id

  • I want to save the entire url in a variable so I can use it later in the test, so {{product_url}}= “https://platform.co/product-123456”

  • I have no way in the platform to get the product id besides from the URL

In scenario above, ideally I would like to save the current webpage url in a variable after creating the product, and then use the “Go to URL” step to navigate to value of the variable.

Please authenticate to join the conversation.

Upvoters
Status

Completed

Board

💡 Feature Request

Date

About 1 year ago

Author

Marius COJOCARIU

Subscribe to post

Get notified by email when there are changes.