TestResults.io
  • What is TestResults.io
  • System Architecture
  • Regulated Markets
    • Health Care Industry
    • Financial Services Industry
  • What's new?
    • Update Instruction
      • Update of the Designer extension in Visual Studio
      • Update the Execution Engine
      • Update the Base- and Environment Models
    • Migration to new project file
  • Designer
    • Overview
    • First Steps
    • Installation
    • TestResults.io solution
    • The development environment
      • Tool Window Overview
        • Test Environments
          • Steps to configure a SUT VM
          • How to access files on the system under test
        • Remote Viewer
          • Control Mode
          • Capture Mode
          • Screen Editor
          • Capture Single Image
        • Screen Explorer
        • Test Case Designer
        • Image Explorer
        • API Testing
        • TestResults.io options
          • Engines
          • Servers
    • Test Cases
      • Adding Test Cases
      • Test Case structure
      • Simple Test Case (Example)
      • Executing your Test Case
      • Generating Test Containers
      • Publishing Test Cases
      • Execution Variables
    • Software Models
      • Adding SW Models
      • Referencing the Model in the Test Case
      • Generating Test Containers
      • Publishing SW Models
      • Screens and Screen Elements
        • Tables
        • Visual Sense
        • Custom Screen Elements
    • Installers
      • Adding Installers
      • Generating Test Containers
      • Publishing Installers
    • Automation Framework Reference
      • Attributes
      • Enumerations
      • Filters
        • IImageFilter Interface
        • Select
        • Resize
      • GlobalEngineParameters
      • ImageDetectionParameters
      • ImageReference
      • Interfaces
        • ITester Interface
          • ITester Methods
          • ITester Properties
        • ITestee Interface
          • ITestee Methods
        • IConnections Interface
          • IConnections Methods
          • IConnections Properties
        • IDebug Interface
        • IEngineResult
        • IHelpers Interface
        • IImageHelper Interface
          • IImageHelper Methods
        • IKeyboard Interface
          • IKeyboard Methods
        • IMouse Interface
          • IMouse Methods
          • IMouse Properties
        • IReport Interface
          • IReport Methods
        • ISUTConnection Interface
      • OcrEngineParameters
        • Best practise
        • IronOcrEngineParameters
        • LEADOcrEngineParameters
        • OcrEngineRelatedCharacters
        • OcrPreprocessingParameters
      • ResultRectangle
      • SutNotReadyException
      • TestStepAbortedException
    • FAQ
      • Two-factor authentication (2FA) and One Time Passwords (OTP)
      • Receive and verify Emails
      • Using Excel as test data source
      • Verify PDF Content
  • Portal
    • Overview
    • First Steps
    • User's Guide
      • Login
      • Projects
      • Dashboard
      • Test Cases
      • Software & Environments
      • Test Sets
      • Job Queue
      • Management
      • Notifications Summary
    • Automation Engineer's Guide
      • Test Automation Workflow
      • Automating a test case
      • Enabling Software & Environments
    • REST API Reference
      • Authentication
      • Projects
      • Test Sets
      • Test Cases
      • Test Plans
      • Test Reports
      • Files
      • Software
      • Environments
      • Untitled
      • Executions
      • Favorites
      • Statistics
      • User Management
      • Customer Management
      • Notifications
      • Configurations
      • Invoicing
  • Models
    • Overview
    • Base Model
      • BaseScreen
        • BaseScreen Properties
        • BaseScreen Methods
      • OnScreenElement
        • OnScreenElement Methods
        • OnScreenElement Properties
      • Primitives
        • Button
          • Button Methods
          • Button Properties
        • Checkbox
          • Checkbox Methods
        • ContextMenu
          • ContextMenu Methods
          • ContextMenu Properties
        • Dropdown
          • Dropdown Methods
          • Dropdown Properties
        • DropdownMenu
          • DropdownMenu Methods
          • DropdownMenu Properties
        • GenericScroller
          • GenericScroller Methods
          • GenericScroller Properties
        • HorizontalScroller
        • IconButton
          • IconButton Properties
        • Label
        • LabelWithButton
          • LabelWithButton Properties
        • LabelWithCheckbox
          • LabelWithCheckbox Properties
        • LabelWithValue
          • LabelWithValue Methods
          • LabelWithValue Properties
        • PwTextBox
          • PwTextBox Methods
        • TextBox
          • TextBox Methods
          • TextBox Properties
        • Tables and lists
          • Column
            • Column Methods
            • Column Properties
          • ItemList
            • ItemList Methods
            • ItemList Properties
          • Row
            • Row Methods
            • Row Properties
          • TableBase
            • TableBase Methods
            • TableBase Properties
        • LabelWithElementBase
          • LabelWithElementBase Properties
      • Enumerations
      • Extensions
        • EngineResultExtensions Methods
        • EnumExtensions Methods
        • ReportExtensions Methods
        • StringExtensions Methods
        • TesterConnectionExtensions Methods
        • TesterDebugExtensions Methods
        • TesterHelperExtensions Methods
        • TesterMouseExtensions Methods
        • TesterOnScreenElementExtensions
        • TesterSelectExtensions Methods
      • Helper Classes
        • BaseModelHelpers
          • BaseModelHelpers Methods
          • BaseModelHelpers Properties
        • Attributes for Designer
        • ListHelpers
      • Exceptions
        • ElementNotFoundException
        • InteractionFailedException
        • ScreenNotFoundException
      • Interfaces
        • IAppBasics Interface
          • IAppBasics Methods
          • IAppBasics Properties
        • IBrowser
        • ICommandLineWindow
        • IScroller Interface
          • IScroller Methods
          • IScroller Properties
        • ISutLocale Interface
          • ISutLocale Methods
          • ISutLocale Properties
        • ISystemHelpers
        • ISystemInteractions
        • IWindow
    • Environment Model
      • Windows
        • Screens
          • CmdWindow
            • CmdWindow Methods
            • CmdWindow Properties
          • FileDialog
            • FileDialog Methods
            • FileDialog Properties
          • FileExplorer
            • FileExplorer Properties
          • RunWindow
            • RunWindow Methods
            • RunWindow Properties
          • Window
            • Window Methods
            • Window Properties
        • SutLocale
          • SutLocale Methods
          • SutLocale Properties
        • SystemHelpers
          • SystemHelpers Methods
          • SystemHelpers Properties
        • SystemInteractions
        • WebBrowser
          • Browser
            • Browser Methods
            • Browser Properties
          • BrowserScroller
            • BrowserScroller Methods
            • BrowserScroller Properties
          • AuthenticationDialog
            • AuthenticationDialog Methods
            • AuthenticationDialog Properties
          • DownloadDialog
            • DownloadDialog Methods
            • DownloadDialog Properties
        • EnvironmentModel Enumerations
        • Interfaces
          • IWebAppBasics
            • IWebAppBasics Property
Powered by GitBook
On this page
  • ClickOutOfBox
  • Enter
  • EnterWithoutVerification
  • GetText
  • PasteText
  • VerifyText
  • VerifyText(String, String)
  • VerifyText(String)

Was this helpful?

  1. Models
  2. Base Model
  3. Primitives
  4. TextBox

TextBox Methods

PreviousTextBoxNextTextBox Properties

Last updated 1 year ago

Was this helpful?

ClickOutOfBox

Clicks out of the TextBox, slightly to the left, to take away the focus of the box.

Syntax:

public virtual void ClickOutOfBox()

Enter

Clicks in the textbox (using of the location image), selects all and types the text. Supports empty text (= delete) and multiple lines (use \n). If 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 () are performed.

Syntax:

public virtual void Enter(
	string textToEnter
)

Parameters:

Parameter

Description

textToEnter

Exceptions:

Exception

Condition

When the TextBox could not be found on the screen.

When the text could not be entered successfully even after the retries.

EnterWithoutVerification

Syntax:

public virtual void EnterWithoutVerification(
	string textToEnter
)

Parameters:

Parameter

Description

textToEnter

Exceptions:

Exception

Condition

When the TextBox could not be found on the screen.

GetText

Syntax:

public virtual string GetText()

Return Value:

The string read from the TextBox.

Exceptions:

Exception

Condition

When the TextBox could not be found on the screen.

PasteText

Pastes the text from the clipboard on the SUT to the text box. Overwrites what was in the text box before.

Syntax:

public virtual void PasteText()

Exceptions:

Exception

Condition

When the TextBox could not be found on the screen.

When the text could not be pasted successfully even after the retries.

VerifyText

Overload List

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.

VerifyText(String, String)

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.

Syntax:

public virtual bool VerifyText(
	string expectedText,
	out string actualText
)

Parameters:

Parameter

Description

expectedText

actualText

Return Value:

true, if the expected Text could be found in the text box, false otherwise.

Exceptions:

Exception

Condition

When the TextBox could not be found on the screen.

VerifyText(String)

Verifies if the text in the textbox is the same as the expectedText.

Syntax:

public virtual bool VerifyText(
	string expectedText
)

Parameters:

Parameter

Description

expectedText

Return Value:

true, if the expected Text could be found in the text box, false otherwise.

Exceptions:

Exception

Condition

When the TextBox could not be found on the screen.

Type: The text that shall be typed into the textbox.

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 . For blind password entry use instead which at least verifies that the correct number of characters were entered

Type: The text that shall be typed into the textbox.

Copies or reads the text from TextBox (depending on the ) 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.

Type: The expected text.

Type: The actual text read from the box.

Type: The expected text.

String
ElementNotFoundException
InteractionFailedException
String
ElementNotFoundException
ElementNotFoundException
ElementNotFoundException
InteractionFailedException
String
String
ElementNotFoundException
String
ElementNotFoundException
VerifyText(String, String)
VerifyText(String)
Enter
RetryCount
PwTextBox.Enter()
ClickOutAfterType
TextBoxType
Hotspot