void ReleaseDesignerOutlets()
        {
            if (ActivityIndicator != null)
            {
                ActivityIndicator.Dispose();
                ActivityIndicator = null;
            }

            if (LogInButton != null)
            {
                LogInButton.Dispose();
                LogInButton = null;
            }

            if (LoginField != null)
            {
                LoginField.Dispose();
                LoginField = null;
            }

            if (PasswordField != null)
            {
                PasswordField.Dispose();
                PasswordField = null;
            }

            if (RegistrationButton != null)
            {
                RegistrationButton.Dispose();
                RegistrationButton = null;
            }
        }
        public override void ViewDidLoad()
        {
            _didShowNotificationObserver = NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.DidShowNotification, KeyBoardDidShow, this);

            _willHideNotificationObserver = NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillHideNotification, KeyBoardWillHide, this);

            ActivityIndicator.StopAnimating();

            this.LoginField.ShouldReturn       += (textField) => textField.ResignFirstResponder();
            this.PasswordField.ShouldReturn    += (textField) => textField.ResignFirstResponder();
            this.AdressField.ShouldReturn      += (textField) => textField.ResignFirstResponder();
            this.PhoneNumberField.ShouldReturn += (textField) => textField.ResignFirstResponder();

            this.View.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                LoginField.ResignFirstResponder();
                PasswordField.ResignFirstResponder();
                AdressField.ResignFirstResponder();
                PhoneNumberField.ResignFirstResponder();
            }));

            RegistrationButton.TouchUpInside += async(sender, e) =>
            {
                Customers registrationFieldsForAsync = new Customers()
                {
                    Name = LoginField.Text, Password = PasswordField.Text, Adress = AdressField.Text, PhoneNumber = PhoneNumberField.Text
                };
                ActivityIndicator.StartAnimating();
                try
                {
                    RegistrationButton.Enabled = false;
                    LoginAndPasswordCheck.LoginCheck(registrationFieldsForAsync.Name);
                    LoginAndPasswordCheck.PasswordCheck(registrationFieldsForAsync.Password);
                    LoginAndPasswordCheck.AdressCheck(registrationFieldsForAsync.Adress);
                    LoginAndPasswordCheck.PhoneCheck(registrationFieldsForAsync.PhoneNumber);
                    await UsersCheckClass.TryToRegister(registrationFieldsForAsync);

                    AppDelegate.UserName = registrationFieldsForAsync.Name;
                    PerformSegue("RegistrationSegue", null);
                }
                catch (FiledsCheckException e1)
                {
                    ActivityIndicator.StopAnimating();
                    RegistrationButton.Enabled = true;
                    PresentViewController(GetAlertsClass.GetAlert(e1.Message), true, null);
                }
                catch (UserCheckClassException e1)
                {
                    ActivityIndicator.StopAnimating();
                    RegistrationButton.Enabled = true;
                    PresentViewController(GetAlertsClass.GetAlert(e1.Message), true, null);
                }
                catch
                {
                    ActivityIndicator.StopAnimating();
                    RegistrationButton.Enabled = true;
                    PresentViewController(GetAlertsClass.GetAlert("Не удалось подключиться к серверу"), true, null);
                }
            };
        }
Esempio n. 3
0
        protected override void SetupLayoutConstraints()
        {
            base.SetupLayoutConstraints();

            this.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

            this.AddConstraints(
                BackgroundImage.FullSizeOf(this));

            this.AddConstraints(
                LoginField.AtTopOf(this, 220),
                LoginField.AtLeadingOf(this, 50),
                LoginField.AtTrailingOf(this, 50),
                LoginField.Height().EqualTo(Theme.Dimensions.TextFieldHeight),

                PasswordField.Below(LoginField, 12),
                PasswordField.WithSameLeading(LoginField),
                PasswordField.WithSameWidth(LoginField),
                PasswordField.WithSameHeight(LoginField),

                SignInButton.Below(PasswordField, 16),
                SignInButton.WithSameCenterX(this),
                SignInButton.Width().EqualTo(218),
                SignInButton.Height().EqualTo(44),

                ErrorMessageView.Above(LoginField, 36),
                ErrorMessageView.WithSameLeading(LoginField),
                ErrorMessageView.WithSameWidth(LoginField),

                ErrorMessageTriangleImage.Below(ErrorMessageView),
                ErrorMessageTriangleImage.WithSameCenterX(this));
        }
Esempio n. 4
0
        private void AuthorizeLoginDialog()
        {
            Log.Write(GetType(), "AuthorizeLoginDialog");

            if (string.IsNullOrEmpty(Login))
            {
                MessageBox.Show("Pole <Login> nie może być puste!", "Błąd", MessageBoxButton.OK, MessageBoxImage.Error);
                LoginField.Focus();
            }
            else if (string.IsNullOrEmpty(Password))
            {
                MessageBox.Show("Pole <Hasło> nie może być puste!", "Błąd", MessageBoxButton.OK, MessageBoxImage.Error);
                PasswordField.Focus();
            }
            else
            {
                CzyZalogowany = OnAuthorizeLogin?.Invoke(this) ?? false;

                if (CzyZalogowany)
                {
                    Close();
                }
                else
                {
                    MessageBox.Show("Błędny login lub hasło!", "Błąd", MessageBoxButton.OK, MessageBoxImage.Error);
                    Clear();
                }
            }
        }
Esempio n. 5
0
 public void LogIn(string login, string password)
 {
     LoginField.ClearAndSendText(login);
     EnterButton.ClickElement();
     WebDriverWaitUtil.WaitForElementToBeVisible(PasswordField);
     PasswordField.ClearAndSendText(password);
 }
Esempio n. 6
0
 public HomePage FillLoginFormAndSubmit(string login, string password)
 {
     LoginField.SendKeys(login);
     PasswordField.SendKeys(password);
     SubmitButton.Submit();
     return(new HomePage());
 }
Esempio n. 7
0
 public DashboardPage LoginOnPage(string login, string password)
 {
     LoginField.SendKeys(login);
     PasswordField.SendKeys(password);
     SubmitButton.Click();
     return(new DashboardPage(Driver));
 }
Esempio n. 8
0
 public LoginPage FillLoginFormWithIncorrectDataAndSubmit(string login, string password)
 {
     LoginField.SendKeys(login);
     PasswordField.SendKeys(password);
     SubmitButton.Submit();
     return(new LoginPage());
 }
Esempio n. 9
0
 public LoginPage(BotContext context) : base(context)
 {
     Button2       = new LoginButtonWrap(context);
     Links         = new Links(context);
     LoginField    = new LoginField(context);
     PasswordField = new PasswordField(context);
     LoginButton   = new LoginButton(context);
 }
Esempio n. 10
0
 public MailMainMenu Login(User user)
 {
     LoginField.SendKeys(user.Login);
     SubmitButton.Click();
     PasswordField.SendKeys(user.Password);
     SubmitButton.Click();
     return(new MailMainMenu(driver));
 }
Esempio n. 11
0
 public void LogIn(String login, String password, WebDriverWait wait)
 {
     wait.Until((d) => IsLoginPageOpened(d));
     LoginField.SendKeys(login);
     PasswordField.SendKeys(password);
     LoginButton.Click();
     wait.Until((d) => MainPage.IsMainPageOpened(d));
 }
Esempio n. 12
0
 public HomePage LoginAs(string username, string password, string domain = "mail.ru")
 {
     LoginField.SendKeys(username);
     PasswordField.SendKeys(password);
     SelectDomain(domain);
     LoginButton.Click();
     return(new HomePage(GetDriver()));
 }
Esempio n. 13
0
        public void Clear()
        {
            Log.Write(GetType(), "Clear");

            LoginField.Text        = "";
            PasswordField.Password = "";

            LoginField.Focus();
        }
Esempio n. 14
0
 public WellsFargo LoginOld(string userId, string password)
 {
     LoginField.Click();
     LoginField.SendKeys(userId);
     PasswordField.Click();
     PasswordField.SendKeys(password);
     LoginButton.Click();
     return(this);
 }
Esempio n. 15
0
        public HomePage LoginUsingJSClick(string username, string password, string domain = "mail.ru")
        {
            LoginField.SendKeys(username);
            PasswordField.SendKeys(password);
            SelectDomain(domain);
            IJavaScriptExecutor js = GetDriver() as IJavaScriptExecutor;

            js.ExecuteScript("document.getElementById('mailbox__auth__button').click()");
            return(new HomePage(GetDriver()));
        }
Esempio n. 16
0
 private bool TryActivateButton()
 {
     if (LoginField == null || LoginField.Replace(" ", "") == "")
     {
         return(false);
     }
     if (PasswordField == null || PasswordField.Replace(" ", "") == "")
     {
         return(false);
     }
     if (SPasswordField == null || SPasswordField.Replace(" ", "") == "")
     {
         return(false);
     }
     return(true);
 }
Esempio n. 17
0
 public RegistrationPage FillAndSubmitRegistrationForm(string login, string email, string name, string surname, string phone, string password, string confirmPassword)
 {
     LoginField.SendKeys(login);
     EmailField.SendKeys(email);
     NameField.SendKeys(name);
     SurnameField.SendKeys(surname);
     PhoneField.SendKeys(phone);
     PasswordField.SendKeys(password);
     RepeatPasswordField.SendKeys(confirmPassword);
     TestDataHelper.ClickRandomDate(BirthDateField);
     UnitField.Click();
     EridCells = Factory.TryFindElements(By.XPath(RegistrationPageLocators.GridCellsLocator));
     TestDataHelper.ClickRandomGridCell(EridCells);
     ConfirmationButton.Click();
     return(new RegistrationPage());
 }
Esempio n. 18
0
        public ActionResult verfyLogin(LoginField login)
        {
            //Pass the data to store the record into the table

            DataTable tbl = new DataTable();

            tbl = login.Login("select * from Admin where Name='" + login.userName + "'and Password='******'");

            if (tbl.Rows.Count > 0)
            {
                return(View("Valid"));
            }
            else
            {
                return(View("inValid"));
            }
        }
        public BasePageObject Login(string username, string password, ExpectedPageObject expectedPageObject)
        {
            LoginField.SendKeys(username);
            PasswordField.SendKeys(password);
            CheckBox.Click();

            SubmitButton.Click();

            if (expectedPageObject == ExpectedPageObject.AccountSummaryPageObject)
            {
                return(new AccountSummaryPageObject(Driver));
            }
            if (expectedPageObject == ExpectedPageObject.OnlineStatementsPageObject)
            {
                return(new OnlineStatementsPageObject(Driver));
            }

            throw new ArgumentException("expectedPageObject");
        }
Esempio n. 20
0
 public RegistrationPage aa(string birthDate, params string[] vs)
 {
     foreach (var item in vs)
     {
         LoginField.SendKeys(item);
         EmailField.SendKeys(item);
         NameField.SendKeys(item);
         SurnameField.SendKeys(item);
         PhoneField.SendKeys(item);
         PasswordField.SendKeys(item);
         RepeatPasswordField.SendKeys(item);
     }
     TestDataHelper.ClickRandomDate(BirthDateField);
     UnitField.Click();
     EridCells = Factory.TryFindElements(By.XPath(RegistrationPageLocators.GridCellsLocator));
     TestDataHelper.ClickRandomGridCell(EridCells);
     ConfirmationButton.Click();
     return(new RegistrationPage());
 }
Esempio n. 21
0
        void ReleaseDesignerOutlets()
        {
            if (LoginField != null)
            {
                LoginField.Dispose();
                LoginField = null;
            }

            if (PasswordField != null)
            {
                PasswordField.Dispose();
                PasswordField = null;
            }

            if (LoginButton != null)
            {
                LoginButton.Dispose();
                LoginButton = null;
            }
        }
        public void StartWork()
        {
            bool flag = true;

            while (flag)
            {
                if (System.DateTime.Now.Hour == 8 && System.DateTime.Now.Minute == 17)
                {
                    LoginField = driver.FindElement(By.Id("username"));
                    LoginField.Click();
                    System.Threading.Thread.Sleep(541);
                    LoginField.SendKeys("fpm.lihovec");
                    System.Threading.Thread.Sleep(432);
                    PassField = driver.FindElement(By.Id("password"));
                    PassField.Click();
                    PassField.SendKeys("1823402");
                    System.Threading.Thread.Sleep(734);
                    SearchInput = driver.FindElement(By.Id("loginbtn"));
                    SearchInput.Click();
                    System.Threading.Thread.Sleep(1231);
                    flag = false;
                }
            }
        }
Esempio n. 23
0
 public void InputLogin(string login)
 {
     LoginField.Click();
     LoginField.SendKeys(login);
 }
Esempio n. 24
0
 public void FillLoginForm(string login, string password)
 {
     LoginField.SendKeys(login);
     PasswordField.SendKeys(password);
     bool a = SubmitButton.Enabled;
 }
Esempio n. 25
0
 public LoginPage InputLogin(string login)
 {
     LoginField.Click();
     LoginField.SendKeys(login);
     return(this);
 }
Esempio n. 26
0
 public void Login(string name, string pass)
 {
     LoginField.SendKeys(name);
     PasswordField.SendKeys(pass);
     LoginButton.Click();
 }
        void ReleaseDesignerOutlets()
        {
            if (ChangeUserButton != null)
            {
                ChangeUserButton.Dispose();
                ChangeUserButton = null;
            }

            if (LoginField != null)
            {
                LoginField.Dispose();
                LoginField = null;
            }

            if (NotificationsFromHoursField != null)
            {
                NotificationsFromHoursField.Dispose();
                NotificationsFromHoursField = null;
            }

            if (NotificationsFromMinutesField != null)
            {
                NotificationsFromMinutesField.Dispose();
                NotificationsFromMinutesField = null;
            }

            if (NotificationsToHoursField != null)
            {
                NotificationsToHoursField.Dispose();
                NotificationsToHoursField = null;
            }

            if (NotificationsToMinutesField != null)
            {
                NotificationsToMinutesField.Dispose();
                NotificationsToMinutesField = null;
            }

            if (PasswordField != null)
            {
                PasswordField.Dispose();
                PasswordField = null;
            }

            if (SendNodesOfflineNotificationsSwitch != null)
            {
                SendNodesOfflineNotificationsSwitch.Dispose();
                SendNodesOfflineNotificationsSwitch = null;
            }

            if (ServerButton != null)
            {
                ServerButton.Dispose();
                ServerButton = null;
            }

            if (UserNameLabel != null)
            {
                UserNameLabel.Dispose();
                UserNameLabel = null;
            }
        }
Esempio n. 28
0
 public void enterUserName(string username)
 {
     LoginField.SendKeys(username);
 }
Esempio n. 29
0
 public void Login()
 {
     LoginField.SetLogin();
     PasswordField.SetPassword();
     LoginButton.Click();
 }
Esempio n. 30
0
 public void Login(string login, string password)
 {
     LoginField.SendKeys(login);
     PasswordField.SendKeys(password);
     LoginButton.Click();
 }