1

I'm trying to automate the Internet explorer using C# in Visual Studio. Unfortunately the protected mode settings are not set to the same value for each zone and I don't have the necessary rights to change that. I tried Selenium Webdriver and shdocvw.internetexplorer so far... But it won't work because of the protected mode settings :( Is there a way to make it work even if I can't change the protected mode settings?

Any help is highly appreciated!

Thanks in advance!

Christopher
  • 9,634
  • 2
  • 17
  • 31
  • What are you doing with that Automated IE? Is this desktop automation? Webscraping? Automatic login? – Christopher Nov 09 '19 at 18:49
  • Thanks for the reply, I'm planning to build a Console Application to Login to a Application, navigate through various menus and enter Data to trigger a process. I can't insert the data via sql and there's no other way to trigger the process :( – Bánh mì Boi Nov 09 '19 at 19:02
  • You can fake being the IE, just by using old UserAgent Spoofing: https://en.wikipedia.org/wiki/User_agent#User_agent_spoofing | Beyond that it is just sending web requests and parsing the HTML you get back. Remoting the IE will propably make that harder. A lot harder. Compared to using WebRequest. – Christopher Nov 09 '19 at 19:03
  • Of course the *ideal* way is to get an API to access this Application. If there is no API, there is a decent chance that such a form of Automation is against the Terms of Use. Could you tell us what application you are trying to work here? – Christopher Nov 09 '19 at 19:05
  • Thanks for the reply, I'll have a deeper look on the topic! So yes, there's no API, it is an internal application we use at work. Such form of automation is allowed, at least the use of RPA Software is allowed. But I want to find a way to automate the System without using RPA Software like BluePrism – Bánh mì Boi Nov 09 '19 at 19:10

2 Answers2

0

According to your comments, you want to remote a WebApplication, that exist in the local Network, does not have an API but you are allowed to do this kind of access.

At least for me it feels like adding the Remoting of a Internet Explorer to the mix, might get overboard. Unless you need something like the dreaded ActiveX controls (wich are a I.E. only thing), or a special plugin, you are often better served with using plain HTTPClient and associated classes.

For there this is basically a question of Web-Scraping.

Christopher
  • 9,634
  • 2
  • 17
  • 31
0

If you want to use selenium you can try this

var capabilitiesInternet = new InternetExplorerOptions {IntroduceInstabilityByIgnoringProtectedModeSettings = true };
driver = new InternetExplorerDriver(capabilitiesInternet);
ggeorge
  • 1,496
  • 2
  • 13
  • 19