Пример #1
0
        public void Login(FacebookServiceParameter parameter)
        {
            NavigateTo(LoginUrl);
            var emailInput = FindElementByXPath("//input[@id='email' or @name='email']");

            emailInput.SendKeys(parameter.Email);
            var passwordInput = FindElementByXPath("//input[@id='pass' and @type='password']");

            passwordInput.SendKeys(parameter.Password);
            var submitButton = FindElementByXPath("//label[@id='loginbutton']/input[@data-testid='royal_login_button' and @type='submit']");

            submitButton.Click();
        }
Пример #2
0
        public void Execute(FacebookServiceParameter parameter)
        {
            using (var browser = new FirefoxDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)))
            {
                switch (parameter.ActionType)
                {
                case FacebookServiceActionType.LOGIN:
                    break;

                case FacebookServiceActionType.LIKE:
                    break;

                case FacebookServiceActionType.COMMENT:
                    break;

                default:
                    break;
                }
            }
        }