简体   繁体   中英

How to code MS Edge IE Mode on VBA using SeleniumBasic

I am using Selenium Basic to automate MS Edge.

I would like to be able to open a url on MS Edge using IE Mode. I found that there is an IEDriverServer.exe that we can use to run urls on MS Edge IE Mode but there is no example how to use it on VBA.

Can someone help me how to properly put it in my code?

Dim driver As New WebDriver
Set driver = New EdgeDriver

driver.Get ("https://google.com")

driver.Refresh

Thanks.

Please refer to https://github.com/florentbr/SeleniumBasic/releases/tag/v2.0.9.0

Once you install Selenium Basic exe on your machine, you will get lot of ready examples with vbscript at installation location.

Also make sure to download latest edge driver and put in installation location by renaming as previous.

Sample code

Set driver = CreateObject("Selenium.EdgeDriver")
driver.Get "edge://settings/defaultBrowser"
driver.Window.Maximize
driver.FindElementByXPath(....<add xpath here>...)
' add required UI component action & xpath for the same.
driver.Quit

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM