TextBox Methods
Last updated
Last updated
Clicks out of the TextBox, slightly to the left, to take away the focus of the box.
Clicks in the textbox (using Hotspot of the location image), selects all and types the text.
Supports empty text (= delete) and multiple lines (use \n
).
If ClickOutAfterType is true, it clicks in the top left corner of the location image to take focus away from textbox.
The text that is entered is verified to ensure the complete text was correctly entered. If the verify fails, the configured amount of retries (RetryCount) are performed.
Enters text in a textbox but does not verify if anything was entered at all. Only use this if there is really no way to verify the enterd text with Enter. For blind password entry use PwTextBox.Enter() instead which at least verifies that the correct number of characters were entered
Copies or reads the text from TextBox (depending on the TextBoxType) and returns it as string.
NOTE: Might not work correctly with empty textboxes (esp. for TextBoxType Clipboard)! If textbox is expected to be empty, use VerifyText("")
before GetText()
to check if it is empty.
The string read from the TextBox.
Pastes the text from the clipboard on the SUT to the text box. Overwrites what was in the text box before.
Verifies if the text in the textbox is the same as the expectedText. If not, provides the actual text read from the Textbox in actualText.
true, if the expected Text could be found in the text box, false otherwise.
Verifies if the text in the textbox is the same as the expectedText.
true, if the expected Text could be found in the text box, false otherwise.
Parameter
Description
textToEnter
Type: String The text that shall be typed into the textbox.
Exception
Condition
When the TextBox could not be found on the screen.
When the text could not be entered successfully even after the retries.
Parameter
Description
textToEnter
Type: String The text that shall be typed into the textbox.
Exception
Condition
When the TextBox could not be found on the screen.
Exception
Condition
When the TextBox could not be found on the screen.
Exception
Condition
When the TextBox could not be found on the screen.
When the text could not be pasted successfully even after the retries.
Name
Description
Verifies if the text in the textbox is the same as the provided text. If not, provides the actual text read from the Textbox in actualText
Verifies if the text in the textbox is the same as the provided text.
Parameter
Description
expectedText
Type: String The expected text.
actualText
Type: String The actual text read from the box.
Exception
Condition
When the TextBox could not be found on the screen.
Parameter
Description
expectedText
Type: String The expected text.
Exception
Condition
When the TextBox could not be found on the screen.