2

我使用 webbrower 为 gmail 注册表单设置自动值,当我填写验证码并提交时,服务器给出消息“对不起,我们目前无法满足您对新帐户的请求。”。我注册手册就成功了。你能解释一下为什么吗?

这是我的代码。

HtmlElement element = webBrowser1.Document.GetElementById("LastName");
        if (element != null) {
            string lastName = "LastName";
            element.InnerText = lastName; 
          }
        element = webBrowser1.Document.GetElementById("lastname-placeholder");
        if (element != null) { element.InnerText = ""; }

        // First Name
        element = webBrowser1.Document.GetElementById("firstname-placeholder");
        if (element != null)
        {
            element.InnerText = "";
        }
        element = webBrowser1.Document.GetElementById("FirstName");
        if (element != null) {
            string firstName = "firstName";
            element.InnerText = firstName;

            element.InvokeMember("onblur");
        }

        element = webBrowser1.Document.GetElementById("GmailAddress");
        if (element != null)
        {
            string account="abcxxx";// 

            element.InnerText = account;

            element.InvokeMember("onblur");
            element.InvokeMember("onChange");

            element.InvokeMember("onFocus");
        }
        // Password
        string password = "abc123xxx";
        element = webBrowser1.Document.GetElementById("Passwd");
        if (element != null) {
            element.InnerText = password;
            emailCreated.Password = password;

            element.InvokeMember("onFocus");
            element.InvokeMember("onblur"); element.InvokeMember("onChange");
        }

        element = webBrowser1.Document.GetElementById("PasswdAgain");
        if (element != null) { element.InnerText = password; element.InvokeMember("onFocus"); element.InvokeMember("onblur"); element.InvokeMember("onChange"); }

        // Day
        element = webBrowser1.Document.GetElementById("birthday-placeholder");
        if (element != null)
        {
            element.InnerText = "";
        }
        element = webBrowser1.Document.GetElementById("BirthDay");
        if (element != null) { element.InnerText = "14"; element.InvokeMember("onblur"); }

        // Month
        element = webBrowser1.Document.GetElementById("BirthMonth");
        if (element != null)
        {
            element.SetAttribute("SelectedIndex", "2"); element.InvokeMember("onblur");

        }
        element = webBrowser1.Document.GetElementById("HiddenBirthMonth");
        if (element != null)
        {
            element.InnerText = "02";
        }
        //Year
        element = webBrowser1.Document.GetElementById("birthYear-placeholder");
        if (element != null)
        {
            element.InnerText = "";
        }
        element = webBrowser1.Document.GetElementById("BirthYear");
        if (element != null) { element.InnerText = "1986"; element.InvokeMember("onblur"); }


        // Gender
        element = webBrowser1.Document.GetElementById("Gender");
        if (element != null) { element.SetAttribute("SelectedIndex", "1"); element.InvokeMember("onblur"); }
        element = webBrowser1.Document.GetElementById("HiddenGender");
        if (element != null) { element.InnerText = "FEMALE"; element.SetAttribute("value", "FEMALE"); element.InvokeMember("onblur"); }


        //RecoveryPhoneNumber
        element = webBrowser1.Document.GetElementById("RecoveryPhoneNumber");
        element.InnerText = txtMobileRecover.Text;


        element = webBrowser1.Document.GetElementById("RecoveryEmailAddress");
        element.InnerText="mailabcxxx@gmail.com"

        //TermsOfService
        element = webBrowser1.Document.GetElementById("TermsOfService");
        if (element != null) { element.SetAttribute("checked", "true"); element.InvokeMember("onblur"); }
        //HomepageSet
        element = webBrowser1.Document.GetElementById("HomepageSet");
        if (element != null) { element.SetAttribute("checked", ""); element.InvokeMember("onblur"); }
        // images
4

1 回答 1

0

Recaptcha 是 js,因此如果您从该 IP 创建了几个帐户,则必须等待一些时间...

即使您清除了包括 flash cookie 在内的 cookie,您的 ip 也会被保存。

据我所知,如果您设法看到您的代码是正确的,并且您通过了所有客户端表单验证。该消息来自服务器,请尝试在其他计算机上进行测试。

于 2012-08-18T20:49:13.083 回答