Open Edge in IE Mode using VBA - vba

I am trying the #longvh registry solution (Automating Edge Browser using VBA without downloading Selenium) and have a question: Do I need to change the VBA code to open Edge in IE Mode, rather than IE? If so, can anyone provide an example of that? Thanks!

Do I need to change the VBA code to open Edge in IE Mode, rather than IE?
There is no COM interface available for the Edge browser. Microsoft has not provided any way to automate the Edge browser using VBA automation.
So, there is no way to fetch the already opened instance of the Edge browser and retrieve elements with the help of VBA.

Related

Using Selenium VBA: How to access a Chrome window that was opened by another app?

I work with Excel VBA Selenium under Windows 10.
I want to access a Chrome window that has previously been opened by another app and of whose name only the first part is known, the rest is a code that changes each time it is created. It is open together with other tabs in the active Chrome browser.
In order to start Chrome with Selenium, all I know to do is
Set dr = New ChromeDriver
This creates an Object "dr". When I look up the properties of dr, the property "Windows" shows the value
"BrowserNotStartedError / Browser not started. Call Get, Start or StartRemotely first."
Start or get both create a new Chrome instance which does not allow me to access windows in the already open instance.
I tried to use this code without "New", but this does not work.
I have not found any hint on how to work on the existing instance of Chrome. Is it possible at all?
If not, how else could I access any existing window? The URL is unique and can only be created by the 3rd party app for security reasons. If I try to copy the URL to the new Chrome instance I get an authentication error, so this is not an option.
This web page basically contains a menu that allows me to download certain data safely, which I want to automate.
Any help is appreciated.
Actually, there is a way to do it with Selenium driver for Chrome.
Locate your chrome.exe directory and copy and append the line below into the target bar.
--remote-debugging-port=9222 (Include the preceding space).
Then copy the following code into a vba module, execute it, and it will allow you to manipulate the existing chrome session that you created.
Dim chromeBrowser As Selenium.ChromeDriver
Sub existingChromeSession()
Set chromeBrowser = New Selenium.ChromeDriver
chromeBrowser.SetCapability "debuggerAddress", "localhost:9222"
chromebrowser.Get("https://www.google.com")
End Sub
My question has been resolved.
With a Selenium driver for Chrome, it is not possible to access Chrome tabs that have not been created with Selenium.
According to QHarr, it could be done by using shell/internet explorer to grab a handle on existing IE windows. In this case, of course, the app would have to create the HTML file with IE, i.e. the default browser would have to be IE.

How to handle window open prompt(native) in webdriver.io

I am using webdriver.io framework. At my application, I have a button that opens a Windows Open prompt (Native), and there I need to choose a folder/file and click Open.
Then returning to my application and continue.
Is there a way to move focus on to this window and control it (Select a path and click Open)?
If not- Is there any other solution someone can offer?
The short answer is probably not, you can't control native dialogs from webdriver.
If it's a file input type for which you want to set a file, you might possibly use webdriver to evaluate a piece of javascript to set the HTMLInputElement.files value of the input element.
This works in modern browsers as mentioned in the mozilla docs

how to open web browser in IE 11 using window.open

is there a way to open web browser in IE 11?
First, I checked the browser version that is 'microsoft edge' or not.
And then, if the browser is 'microsoft edge', I wanna open new window in IE 11 by using window.open.
Is it possible?
Here is a sample.
function checkVersion() {
//i wanna open new window in IE11.
//window.open('www.google.com');
}
Is there way to solve this problem?
Let me see if I am understanding correctly.
If someone is using Microsoft Edge, then you want to use JavaScript to open a new browser window in Internet Explorer 11. In other words, you want to switch browsers.
Is that right?
You will not be able to do this in MS Edge.
You would need to use something like Active X or Browser Helper Objects which are not part of MS Edge. Here is an example of you would have done it with ActiveX.

Identifying word documents opened by Selenium Webdriver

In my Selenium project word document is being opened as a report.
How can I identify whether the document is opened or not using Selenium webdriver.
In short, unless the document opens utilizing the browser, then you can't with Selenium WebDriver. Selenium only has access to what the browser itself has access to. If the browser is handing this off to the OS or MS Office to handle the specifics then you lose access to it.
You could try to intercept the communication and determine when the code to call the word document to open is executed, but that would be custom code and depend on the application itself.
Personally I think the best way would be to instantiate an OpenQA.Selenium.Interactions.Actions class instance and then specify the specific keystrokes to capture the screen and save it. Then switch back to the browser window driver.switchto().window() and continue. Then you can verify manually that the screen capture has the word document in it after the test is completed.

open browser plugin using access vba

i have a plugin installed in chrome browser.it shows star at top right of my browser when click that star it opens the window have some data. i want to write a program using ACCESS vba that will click the link n get data. the window does not have any source code provided.
please help me any thing that solve this issue is welcome.
regards
Access cannot control PC outside it's purview.
I suggest, you use Scripting language to achieve your desired results.