Questions tagged [shdocvw.internetexplorer]

This is the COM API for automation of Internet Explorer windows. This tag should be used when one is attempting to create and automate instances of internet explorer programmatically from a variety of COM compatible languages, such as C/C++, powershell, .Net languages, etc.

Questions that deal with the usage/troubleshooting of this API, or in some cases how to access lower level COM components that are not fully exposed by the API would be appropriate.

19 questions
2
votes
1 answer

How to make SHDocVw.InternetExplorer fire events that get caught with JS addEventListener?

The following problems: I need to simulate a double-click on a div element. I need to use/handle MS Internet Explorer 11. I cannot change the source code of the target site. My solution so far: I use C# and SHDocVw.InternetExplorer and mshtml I…
2
votes
0 answers

System.Runtime.InteropService.COMException thrown and Internet Explorer closes

I'm using SHDocVw.InternetExplorer to open and control a browser window for automation on an internal website. The software generally performs as desired but the browser will close occasionally. I have tracked down the lines of code that cause it to…
jonyfries
  • 772
  • 6
  • 20
2
votes
1 answer
1
vote
0 answers

How can I differentiate between SHDocVw.InternetExplorer and SHDocVw.WebBrowser_v1 with VB.NET?

I have a WPF application with a function to loop through open IE web pages (yes, we're still using IE) and scrape data from the HTML. Occasionally, users will get an error indicating "Public member 'name' on type WebBrowswer_V1 not found" followed…
1
vote
1 answer

C# - mshtml and SHDocVw Complete Documentation

I'm not sure if this is a valid question here but I am having a hard time finding proper documentation for these 2 DLLs, mshtml and SHDocVw. I'm trying to do some automation using these 2 DLLs. To do that, I must read and understand first what…
1
vote
1 answer

Web Elements Captuing using mshtml and shdocview vb.net/C#

I want to design a WPF page where we can capture web screen elements. This should work something similar to IE F12(DOM Explorer) select element option. Can anybody please suggest where to start. Thanks in advance
user6734638
0
votes
0 answers

Get HTML display area (viewport) offset to 0/0 and zoom of IE window using .NET/C# and SHDocVw.InternetExplorer

THIS IS NOT A HTML / JAVASCRIPT / CSS question! Check out these images: I need to get the HTML display area (aka viewport) offset to the 0/0 of the IE window. I am targeting Microsoft Internet Explorer 11. I am using C# with…
JayC667
  • 2,418
  • 2
  • 17
  • 31
0
votes
1 answer

The data in A "id" is not printing

i am trying this Sub JJ() Dim IE As New SHDocVw.InternetExplorer Dim hdoc As MSHTML.HTMLDocument Dim ha As String IE.Visible = True IE.navigate "https://www.nseindia.com/get-quotes/equity?symbol=DIVISLAB" Do While IE.readyState <>…
AAdi
  • 15
  • 4
0
votes
0 answers

SHDocVw works only with Win 10 x64 version

I have the following code written in C# WinForms: ... SHDocVw.WebBrowser_V1 axBrowser = (SHDocVw.WebBrowser_V1)webBrowser1.ActiveXInstance; if (axBrowser != null) { axBrowser.GetType().InvokeMember("Silent", BindingFlags.SetProperty,…
0
votes
1 answer

Does IE need to be installed to use shdocvw.dll?

Since long we are using shdocvw.dll to show web pages in our application. Should using the dll also work when Internet Explorer is not installed and Edge is installed?
0
votes
0 answers

Unable to cast COM object of type 'System.__ComObject' to interface type 'mshtml.HTMLDocument'

trying to attach to an IE browser.. it works for awhile then starts throwing this error... --------------------------- --------------------------- Unable to cast COM object of type 'System.__ComObject' to interface type 'mshtml.HTMLDocument'. This…
0
votes
1 answer

InvalidCastException when reading mshtml.HTMLDocument.Script property

Trying to read the mshtml.HTMLDocument property results in the following exception: An unhandled exception of type 'System.InvalidCastException' occurred in mscorlib.dll Additional information: Specified cast is not valid. occurred This is happening…
Eric Scherrer
  • 3,328
  • 1
  • 19
  • 34
0
votes
1 answer

VB .NET SHDocVw.InternetExplorer: Windows Security popup

Hello I'm using Internet Explorer headless mode to perform automated tasks on my script but I'm encountering an issue when sometimes by surfing on some pages there are authentication popups that show up to log into the page but not through a HTML…
iThomas
  • 15
  • 4
0
votes
1 answer

How to change the top-left icon on a ShDocVW C# window

First of all, I am a real newbie to programming in Visual Studio. That being said, I have created a small program that pops up an Internet Explorer window; I now want to replace the Internet Explorer icon in the top-left corner with the project's…
0
votes
0 answers

How to wait for SHDocVw InternetExplorerClass.DocumentComplete event in a C# unit test?

I have a unit test code that needs to open a page in IE and do something after the document is complete. The page contains redirects and at the end loads Silverlight (we are stuck with it for another year). Here is the code: using System; using…
mark
  • 59,016
  • 79
  • 296
  • 580
1
2