How do we perform copy paste actions on a url, with TestRigor?

193 Views Asked by At

When we click on the copy icon in a page there is a url which is copied to the clipboard. We need to paste the url from the clipboard into the address bar of a new tab. How do we achieve this with TestRigor?

1

There are 1 best solutions below

0
KevinMCarroll On

This is possible by grabbing the URL value instead of using the copy icon. It would look something like this:

grab value from on the left of "COPY" and save it as "generatedURL"
open url stored value "generatedURL"

If the new tab is necessary for your test case, use the following:

grab value from on the left of "COPY" and save it as "generatedURL"
open new tab
open url stored value "generatedURL"

You will have to modify the steps to reflect the relative location of the URL on your screen. Alternatively, you can use the name of the field containing the URL you want to use.

For example:

grab value from "style-scope tr-copy-link-renderer" and save it as "generatedURL"
open new tab
open url stored value "generatedURL"

Remember to swap out "style-scope tr-copy-link-renderer" for the name of the field containing the URL you want to copy.