示例#1
0
 public SignUpPage FillEmail(string email)
 {
     EmailInputField.Click();
     EmailInputField.Clear();
     EmailInputField.SendKeys(email);
     return(this);
 }
示例#2
0
 /// <summary>
 /// Clears the input fields, inputs data and clicks the login button.
 /// </summary>
 /// <param name="login"></param>
 /// <param name="password"></param>
 public void Authenticate(string login, string password)
 {
     EmailInputField.Clear();
     EmailInputField.SendKeys(login);
     PasswordInputField.Clear();
     PasswordInputField.SendKeys(password);
     LoginButton.Click();
 }
示例#3
0
    public void SendOTP()
    {
        SoundController.soundsControllerInstance.PlayButtonsound();
        PhoneNumber = MobileNumberInputField.text.ToString();
        Email       = EmailInputField.GetComponent <InputField>().text.ToString();
        Name        = NameInputField.GetComponent <InputField>().text.ToString();
        DeviceId    = SystemInfo.deviceUniqueIdentifier.ToString();

        if (!string.IsNullOrEmpty(PhoneNumber) && PhoneNumber.Length == 10 && !string.IsNullOrEmpty(Email) && validateEmail(Email) && !string.IsNullOrEmpty(Name))
        {
            StartCoroutine(WebServiceController.webServiceController_Instance.SendOTPUrl(PhoneNumber, Email, Name, DeviceId));
            OTPInputFieldDialogOpen();
            OTPDialog.SetActive(true);
        }
        else
        {
            if (string.IsNullOrEmpty(PhoneNumber) || PhoneNumber.Length != 10)
            {
                MobileNumberInputField.text = "";
                MobileNumberInputField.placeholder.GetComponent <Text>().text  = "Enter valid number";
                MobileNumberInputField.placeholder.GetComponent <Text>().color = Color.red;
                Animator anim = MobileNumberInputField.GetComponent <Animator>();
                anim.Play("WrongInputFieldShake");
            }
            if (string.IsNullOrEmpty(Email) || !validateEmail(Email))
            {
                EmailInputField.text = "";
                EmailInputField.placeholder.GetComponent <Text>().text  = "Enter valid email";
                EmailInputField.placeholder.GetComponent <Text>().color = Color.red;
                Animator anim = EmailInputField.GetComponent <Animator>();
                anim.Play("WrongInputFieldShake");
            }
            if (string.IsNullOrEmpty(Name))
            {
                NameInputField.text = "";
                NameInputField.placeholder.GetComponent <Text>().text  = "Enter valid name";
                NameInputField.placeholder.GetComponent <Text>().color = Color.red;
                Animator anim = NameInputField.GetComponent <Animator>();
                anim.Play("WrongInputFieldShake");
            }
        }
    }
示例#4
0
 /// <summary>
 /// Fills the email input with the data provided.
 /// </summary>
 /// <param name="data"></param>
 public void FillEmailWithData(string data)
 {
     EmailInputField.Clear();
     EmailInputField.SendKeys(data);
 }