Forum Discussion

littlebear's avatar
littlebear
Occasional Contributor
6 days ago

Making a URL semi-agnostic Page object in Keyword Test

Hello All,

My question is quite brief. I am trying to automate a website with a Keyword test. Let's call it:

https://www.test.com

Suppose that after I save something on this website, the URL changes to:

https:/www.test.com/12WJQ4L/

Afterwards, I want to do one or two actions on the screen, and then I close the page. The problem is that the end of the URL changes whenever you make different changes to the initial site. So next time I open, manipulate, and save the page, the URL is:

https://www.test.com/63XTY8K/

In code, I'm sure you could do something to the effect of "https://www.test.com/" + * + "/" to identify the Page, but I don't see how I would use a code snippet in this case. Is it possible to create such a dynamic URL Page object in a Keyword test?

Thank you,

  • I'm sorry to have inconvenienced everyone. You can just do exactly what I had said, and type in 'https://www.test.com/*/' as the URL selector for the Page object.

    I should have checked it before running to the community. I hope this helps someone who may have a similar question later on.

    Thanks,