How to get the URL of a webpage?


I am developing a process that automatically open a certain URL in the browser after clicking on a button.

Is there any good way to get such a URL ?

Thank you guys :smiley:


Can you try Inject JS Script Activity with the following script code?

"function(e,v){return location.href;}"

We can get current url of browser.


Please, could you provide me more details on how to do it?

I’d be very pleased if you could share the xaml.

Thanks in advance.


Unfortunately, I cannot upload xaml file now because of my current environment.

Can you try the following steps?

  1. First, If you use Attach Browser, drag and drop Inject JS Script activity to Do of Attach Browser.

2.If you don’t use Attach Browser, drag and drop JS Script, click Indicate on Screen and indicate browser.

  1. Then set the following setting to Inject JS Activity
    Script Code:"function(e,v){return location.href;}"
    Output: Set GenericValue type variable (Let’s say result)

  2. We can get the URL using result.toString()


Hello, thank you very much. I tried but th next error is shown:



I’ll share a sample xaml file as the following. Can you check it?

Sequence.xaml (8.6 KB)