public bool Validate() { ServernameTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource(); ServerAddressTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource(); PortTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource(); PasswordTextBox.GetBindingExpression(PasswordHelper.PasswordProperty).UpdateSource(); DescriptionTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource(); return(IsValid()); }
public void MultipleFilesDownload() { FileNameTextBox.SendKeys("dotNetFx45_Full_setup.exe;directx_Jun2010_redist.exe"); ServerAddressTextBox.SendKeys("https://download.microsoft.com"); StartButton.Click(); Thread.Sleep(TimeSpan.FromSeconds(5)); // Wait for files to download var lastLog = GetLastLog(); var status = lastLog.Split(',')[1].Trim(); Assert.AreEqual("Status Code: 200", status); }
private void SetInitialFocus() { if (string.IsNullOrWhiteSpace(ServerAddressTextBox.Text)) { ServerAddressTextBox.Focus(); return; } if (string.IsNullOrWhiteSpace(UsernameTextBox.Text)) { UsernameTextBox.Focus(); return; } if (string.IsNullOrWhiteSpace(PasswordBox.Password)) { PasswordBox.Focus(); } }