SeleniumBasic
SeleniumBasic copied to clipboard
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.
Hello ,
You need to use this Selenium Basic with VB script to add the URL into IE mode settings & then in new tab again open that URL. It shall open in IE Mode inside edge browser.
In order to complete first section refer below script -
Set driver = CreateObject("Selenium.EdgeDriver")
driver.Get "edge://settings/defaultBrowser"
driver.Window.Maximize
driver.FindElementByXPath( <<add xpath of Add button>>).Click
driver.FindElementByXPath(<
Thanks for the tip and sample above, but how do I open a new tab with selenium basic? I tried driver.window.switchtonextwindow but that doesn't work.
Hello there, This opens a new tab in Edge using VBA and Selenium Basic.
driver.ExecuteScript "window.open('');" ' Opens a NEW TAB in Edge driver.SwitchToNextWindow driver.Get ("https://google.com")
Yep, I know how to do that. What this coding doesn't do is to open the website in IE Mode.