question

VivekRamesh-0096 avatar image
0 Votes"
VivekRamesh-0096 asked YuZhou-MSFT commented

How to get list of active URLs from Edge browser

Hi all,

I'm using VBScript to launch an Edge browser with a specific URL in an app mode. In this, I need to include a code to check whether the same URL is already open in any instance of Edge browser. Is there any way to get the list of URLs that are currently opened in the Edge browser in VBScript / Batch file?

Thanks in Advance,

ms-edge
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @VivekRamesh-0096

How do you open Edge using VBScript, with WebDrive or anything else? Please provide a minimal code snippet so that we can have a better understanding of the issue.
If you're using WebDriver to automate Edge, I think you can try to use driver.Url to get the url you open.

0 Votes 0 ·

Hi @YuZhou-MSFT

I am using the below code in VBScript to open an Edge browser and this VBScript is used just to open the application in an Edge browser instead of opening Edge and typing the URL manually.

 AppToLaunch = "msedge --new-window --app=" & "http://servername/index.aspx"        
 dim WshShell
 set WshShell = WScript.CreateObject("WScript.Shell")
 WshShell.Run AppToLaunch

Thanks,

0 Votes 0 ·
YuZhou-MSFT avatar image YuZhou-MSFT VivekRamesh-0096 ·

Hi @VivekRamesh-0096

I think you can't get URLs from Edge browser using the code above. Edge doesn't support the COM automation interface that used in VBS, so there will be many restricts.
The only way I can think of working around this is using WebDriver to automate Edge.

1 Vote 1 ·

0 Answers