コード例 #1
0
ファイル: SuplementyService.cs プロジェクト: HaWooS/CefBot
        public SuplementyService()
        {
            this.actions = new Stack <object>();
            actions.Push(GetLogOutScript());
            actions.Push(GetRedirectScript());
            actions.Push(GetLoggingInScript());
            actions.Push(GetRedirectToLoginPageScript());

            //dictionary forbidden subsites for CheckForConditionOfBrowser method that checks the condition of flow in browser
            //dictionary determines which subsites are associated with operations ended due to error and which exception is assigned to each error
            this.forbiddenSubsites = new Dictionary <string, Exception>();
            this.forbiddenSubsites.Add(errorLoginUrl, new InvalidCredentialsException(CredentialProvider.GetUsername(), CredentialProvider.GetPassword()));
        }
コード例 #2
0
ファイル: SuplementyService.cs プロジェクト: HaWooS/CefBot
        public object GetLoggingInScript()
        {
            CredentialProvider.stringBuilder.Clear();
            CredentialProvider.stringBuilder.AppendLine("document.getElementById('user_login').value = '" + CredentialProvider.GetUsername() + "';");
            CredentialProvider.stringBuilder.AppendLine("document.getElementById('user_pass').value='" + CredentialProvider.GetPassword() + "';");
            CredentialProvider.stringBuilder.AppendLine("document.getElementsByClassName('btn signin_button')[0].click();");
            var loggingInScript = CredentialProvider.stringBuilder.ToString();

            return(loggingInScript);
        }
コード例 #3
0
        public object GetLoggingInScript()
        {
            CredentialProvider.stringBuilder.Clear();
            CredentialProvider.stringBuilder.AppendLine("document.getElementsByClassName('button_button--sYDKO details_save--3nDG7')[0].click();");
            CredentialProvider.stringBuilder.AppendLine("document.getElementById('auth').value='" + CredentialProvider.GetUsername() + "';");
            CredentialProvider.stringBuilder.AppendLine("document.getElementById('password').value='" + CredentialProvider.GetPassword() + "';");
            CredentialProvider.stringBuilder.AppendLine("document.getElementById('elSignIn_submit').click();");
            var loggingInScript = CredentialProvider.stringBuilder.ToString();

            return(loggingInScript);
        }