Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TextBox UI test to type less text to decrease flakyness #1345

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions UITests/Tests/TextBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,26 +115,26 @@ public void SendKeys()
{
textBoxElement1.Clear();
Assert.AreEqual(string.Empty, textBoxElement1.Text);
textBoxElement1.SendKeys("abcde12345!@#$%");
Assert.AreEqual("abcde12345!@#$%", textBoxElement1.Text);
textBoxElement1.SendKeys("abc");
Assert.AreEqual("abc", textBoxElement1.Text);

// Use Ctrl + A to select all text and backspace to clear the box
textBoxElement1.SendKeys(Keys.Control + "a" + Keys.Control + Keys.Backspace);
Assert.AreEqual(string.Empty, textBoxElement1.Text);

textBoxElement2.Clear();
Assert.AreEqual(string.Empty, textBoxElement2.Text);
textBoxElement2.SendKeys("fghij67890^&*()");
Assert.AreEqual("fghij67890^&*()", textBoxElement2.Text);
textBoxElement2.SendKeys("efg");
Assert.AreEqual("efg", textBoxElement2.Text);
}

[TestMethod]
public void Text()
{
textBoxElement1.Clear();
Assert.AreEqual(string.Empty, textBoxElement1.Text);
textBoxElement1.SendKeys("abcde12345!@#$%");
Assert.AreEqual("abcde12345!@#$%", textBoxElement1.Text);
textBoxElement1.SendKeys("abc");
Assert.AreEqual("abc", textBoxElement1.Text);
}
}
}