Why doesn’t Webbrowser show us reCaptchas?

Asked

Viewed 745 times

1

I put to navigate normally on this site. However it not only deform the Textbox of the site, it still does not display the reCaptchas. The site of Scripterros. But other sites do, too, but it’s not the same. What can it be?

FORM

FORM

CHROME

inserir a descrição da imagem aqui

  • is related to the IE version, take a look here: https://www.cyotek.com/blog/configuring-the-emulation-mode-of-an-internet-explorer-webbrowser-control

1 answer

2


You need to set the Webbrowser version to 11, so implement the method below in your main form:

Don’t forget the using Microsoft.Win32;

    public void VerifyVersion(WebBrowser webbrowser)
    {
        string appName = "";
        try
        {
            appName = System.Diagnostics.Process.GetCurrentProcess().ProcessName + ".exe";

            RegistryKey fbeKey = null;
            ////For 64 bit Machine 
            fbeKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"SOFTWARE\\Wow6432Node\\Microsoft\\Internet Explorer\\MAIN\\FeatureControl\\FEATURE_BROWSER_EMULATION", true);
            if (fbeKey == null)
                fbeKey = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\\Wow6432Node\\Microsoft\\Internet Explorer\\MAIN\\FeatureControl\\FEATURE_BROWSER_EMULATION");
            using (fbeKey)
            {
                fbeKey.SetValue(appName, 11000, RegistryValueKind.DWord);
            }


            //For 32 bit Machine 
            fbeKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"SOFTWARE\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION", true);
            if (fbeKey == null)
                fbeKey = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION");
            using (fbeKey)
            {
                fbeKey.SetValue(appName, 11000, RegistryValueKind.DWord);
            }
        }

        catch (Exception ex)
        {
            MessageBox.Show(appName + "\n" + ex.ToString(), "Unexpected error setting browser mode!");
        }
    }

Mode of use:

VerifyVersion(webbrowser1);

In your case

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.Win32;

namespace Fast_Bitcoin
{
    public partial class freeBitcoinForm : Form
    {
        public freeBitcoinForm()
        {
            InitializeComponent();
            VerifyVersion(webbrowser1);
        }

        private void freeBitcoinForm_Load(object sender, EventArgs e)
        {

        }
        public void VerifyVersion(WebBrowser webbrowser)
        {
            string appName = "";
            try
            {
                appName = System.Diagnostics.Process.GetCurrentProcess().ProcessName + ".exe";

                RegistryKey fbeKey = null;
                ////For 64 bit Machine 
                fbeKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"SOFTWARE\\Wow6432Node\\Microsoft\\Internet Explorer\\MAIN\\FeatureControl\\FEATURE_BROWSER_EMULATION", true);
                if (fbeKey == null)
                    fbeKey = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\\Wow6432Node\\Microsoft\\Internet Explorer\\MAIN\\FeatureControl\\FEATURE_BROWSER_EMULATION");
                using (fbeKey)
                {
                    fbeKey.SetValue(appName, 11000, RegistryValueKind.DWord);
                }


                //For 32 bit Machine 
                fbeKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"SOFTWARE\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION", true);
                if (fbeKey == null)
                    fbeKey = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION");
                using (fbeKey)
                {
                    fbeKey.SetValue(appName, 11000, RegistryValueKind.DWord);
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show(appName + "\n" + ex.ToString(), "Unexpected error setting browser mode!");
            }
        }

    }
}

Explanation:

You need to change the windows registry so that your system understands that your webbrowser has to run in version 11.

You have to change the record FEATURE_BROWSER_EMULATION

fbeKey.SetValue(appName, 11000, RegistryValueKind.DWord);

Above we are setting the version to 11, if we want other version follow the table below

Versão do IE    | Número para registro
    7           |   7000
    8           |   8000
    8 Standards |   8888
    9           |   9000
    9 Standards |   9999
    10          |  10000
    10 Standards|  10001
    11          |  11000
    11 Edge     |  11001

Browser other questions tagged

You are not signed in. Login or sign up in order to post.