1

I am currently working with wpf. In the wpf, I have the functionality to open the import 'bloc/splash_screen/splash_screen_bloc.dart'; using SHDocVw also to access the HTMLDocument of the IE browser.

I need to migrate the functionality to open the given url in Microsoft Edge browser from IE browser. Also I need to access the Edge browser property to get the import 'bloc/splash_screen/splash_screen_bloc.dart'; content of the same.

    var ie = LoadBrowser(userCredentials.URL);

    private InternetExplorer LoadBrowser(string url)
    {
        object URL = url;
        object Empty = 0;

        var ie = new InternetExplorer { Visible = true };

        ie.Navigate2(ref URL, ref Empty, ref Empty, ref Empty, ref Empty);

        while (ie.Busy)
        {
            Thread.Sleep(waitTime);
        }

        return ie;
    }

The above code open the IE browser with specified URL. Below is used currently for accessing the HTMLDocument

    private void LoginToWebsite(InternetExplorer ie, LoginDetailsModel userCredentials)
    {
        while (ie.Busy)
        {
            Thread.Sleep(waitTime);
        }

        var htmlDoc = ie.Document as IHTMLDocument2;

I need to migrate the same functionality to Edge browser to open and also to access the HtmlDocument of Edgebrowser same as above. Can some one provide the migration steps for Edge. If Webview2 is the only solution then please help me with the migration steps and also to access the HtmlDocument as well

YLR
  • 1,503
  • 4
  • 21
  • 28

0 Answers0