IE Plug-Ins (QVP) in C# WebBrowser Control? - c#

I'm writing a C# application that uses a System.Windows.Forms.WebBrowser control to access a web application.
In this web application we use a program (Quick View Plus) that integrates with Internet Explorer to provide in-browser viewing for a number of document types not normally handled by Internet Explorer (WPD, DOC, XLS, PDF, etc.).
My understanding of the WebBrowser control is that it shares settings with the user's own copy of IE, however, I am seeing different behavior between the two:
When I open the web application in Internet Explorer, all desired file types are successfully opened using Quick View Plus.
When I open the web application in the WebBrowser control, only PDFs are loaded in Quick View Plus (showing, at least, that it can run inside a WebBrowser control) - however, other formats (for instance WPD, XLS, DOC) are not opened in Quick View Plus - instead the browser downloads them and automatically opens them with the default application.
Why could this behavior vary, and what steps should I take to try to get it to behave consistently?
If relevant, IE8 is in use.

Related

LeanFT 15.0.2 is not identifying Web Elements in MSEdge

We am using LeanFT with C# to automate my Sample Web Application which is heavily used in IE only. Since microsoft is ending support with IE, we are moving the tests to MSEdge where there are certain components which will be loaded in Browser if and only if I enable the EDGE browser to use IE server mode
Now once the IE Server mode is enabled on MSEdge, the browser is launching and the URL is being navigated. But when I enable Object spy two identify an element for my OR file, the browser view window is completely shown as IEserverWindow ( i.e Standard Desktop Windows ) and the web elements can't be identified
I had enabled UFT extension on browser by manually loading unpacked extension on Edge
Added the NativeMessgaingHost key
We need to upgrade to UFT 2021
https://admhelp.microfocus.com/uft/en/2021-2021_R1/UFT_Help/Content/Addins_Guide/Chrome_Chromium_FF_Limitations.htm#IE

Is there any way to fully control browser from application?

I was trying to make a pc application that helps people more conveniently when they are using a browser(e.g Chrome, Firefox, Edge ...)
For example, the application shows the default browser and let user can choose another browser as default if they want to, and the app shows all windows that are currently opened; Overmore, when the user clicks a specific window then app will focus the window.
user can select default browser
user can see all windows categorized by browser type
So, my initial planning was using Election js; however, I've found that there is no way to control a browser from the Electron application since Node js cannot access the users' system(this thinking could be wrong since I have poor English😥)
After some research, I'm guessing C# can do that by using windows api. I've saw this post that saying by using DDE, we can get tabs urls.
But I'm wondering if C# can fully control a browser; for instance, create a new window, notice if music or video is playing in the tab, request to browser for getting favorites list.
If it cannot, how about requesting api to the browser from pc application?
You cannot fully control a browser. Internet Explorer was the only browser that had a documented and supported API to control, inspect and automate. Internet Explorer is dead so this is a dead end. The basic DDE control interface is also outdated.
Accessing favorites and the content of open tabs is limited because evil people would use such APIs to inject and spy. If you want to access the favorites you will have to write custom code for each browser.
Using the accessibility and UI automation APIs is the only reliable and supported way of interacting with modern browsers. SetWinEventHook can be used to detect window creation and primitive state changes. MSAA/UI Automation needs to be used to get more information from each browser window.
The thumbnail API and/or magnifier API can be used to get the preview image.
To open a new tab, execute a new process with the URL on the command line. Some per-browser customization might be required (-new-tab parameter etc).
Use IApplicationAssociationRegistration::QueryCurrentDefault to detect the default browser.

How to allow the block content of the active X controls in a web browser control?

I am working in visual studio 2010 creating a userControl which contents a webBrowser. This webBrowser navigates to a html file which is inside the project. The html imports the jQueryUI among other scripts and displays a popUp of this library.
I get the next problem: "to help protect you security, your web browser has restricted this file from showing active content that could access your computer"
And the popUp does not display. I have tried with the Mark of the web but it does not work and I have no more ideas.

Is it possible to open a new tab in IE when the main window is chrome | ASP.Net

I have an asp.net c# web application(strictly for intranet usage)
I need to open a MS word document present on a remote file share, it should be saved to the same location when saved.
I achieved this using IE, but due to security model of chrome and firefox, the file:/// opens a blank window.
Is it possible to open an IE window from the existing application in chrome/firefox?
You can't controll other application using javascript in browser.
If you want to open MS Word document in window browser you will need an extension for browser or you can use javascript based script witch allow to view (and optionally edit) MS Word documents. However it may be a couple differences between MS Word and javascript editor, in usage, document layout, fonts, spaces, etc..

Hosted WebBrowser control attempts to download Flash content rather than playing it

I am hosting an IE browser control in a simple, .NET winforms app. When I make the control navigate to certain content on disk, the control attempts to download the file (rather than displaying the content.) The exact same URL when pasted into the IE browser will properly display the swf file in question along with processed XML data that is passed as a parameter.
Abbreviated example of the URL:
file:///C:/...SomeSwfFile.swf?dataXML=%3C ... assume well-formed XML here
What can i do to get the browser control to behave just like the IE application with that type of URL?
Additional per feedback: HTML files are loaded into the control just fine.
The issue was that i was trying to host a Flash control inside a web browser control built on a x64 dev box. At this point in time Flash doesn't do well in 64 bit processes. When i set the app to build for x86 everything worked fine.

Categories

Resources