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
  • Description
  • TextBox Class
  • Constructors
  • Methods
  • Properties

Was this helpful?

  1. Models
  2. Base Model
  3. Primitives

TextBox

PreviousPwTextBox MethodsNextTextBox Methods

Last updated 1 year ago

Was this helpful?

Description

The TextBox class represents an input field where a user can enter text and/or that displays text. Text is entered by clicking in the input field (defined by the of the image given in the constructor), selecting all the text and typing the required text.

Text in the TextBox is read or verified either through the clipboard or with the help of the OCR algorithm, depending on the .

This primitive assumes that keyboard navigation (Ctrl-A, end, home etc.) is supported.

TextBox Class

Namespace: Progile.TRIO.BaseModel Assembly: Progile.TRIO.BaseModel (in Progile.TRIO.BaseModel.dll)

Inheritance Hierarchy:

Progile.TRIO.BaseModel.TextBox

Constructors

Creates a new TextBox instance. The textbox is defined by the Hotspot of imageName which can be found with the provided filters.

Textbox(IAppBasics, string, ImageReference, IImageFilter[])

Syntax:

public TextBox(
	IAppBasics appBasics,
	string displayName,
	ImageReference imageReference,
	params IImageFilter[] filters
)

Parameter

Description

appBasics

displayName

imageReference

filters

Textbox(ITester, ISystemHelpers, string, ImageReference, IImageFilter[])

Syntax:

public TextBox(
	ITester tester,
	ISystemHelpers systemHelpers,
	string displayName,
	ImageReference imageReference,
	params IImageFilter[] filters
)

Parameter

Description

tester

The tester interface.

systemHelpers

Access to the SUT system specific shortcuts for select all text, copy, paste, etc.

displayName

imageReference

filters

Methods

Name

Description

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

Clicks in the textbox (using hotspot of locationImage), selects all and types the text. Supports empty text (=delete) and multiple lines (use \n). If clickOutAfterType is true, it clicks in the middle of the loactionImage to take focus away from textbox.

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.

Pastes the text from the internal clipboard 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.

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

Properties

Name

Description

Determines wether we should click out of the textbox after typing to take away focus of the textbox and thus confirming the value. Default: true

Determines wether we should click out of the textbox before using ocr on the textbox to avoid detecting the cursor as a character. Default: true

The default Textbox type if nothing else is configured. Default is Clipboard. Set this to OCR if SUT doesn't support clipboard transfer.

The tolerance to use in the SelectFromColorAtPoint method when defining the TextBoxSelect.

Indicates whether the Text property containing the content of the textbox as it is known to the model was read from the SCREEN, SET by the model itself (e.g. enter Text) or is UNKNOWN.

The content of the textbox as it is currently known to the model. Use DataSource Enum to see where the model got this information.

The ocr paras that are used to get or verify text in the box. Only applies to TextBoxType OCR.

The select filter containing the textbox input rectangle defined by the closed border around the hotspot of the location image given in the designer. This Select is used to read and verify Text for TextBoxType OCR.

Type:

The interface for the AppBasics, that is available on every . Allows access to the and the .

Type: The name of the element that will be used for logging and reporting of exceptions (customer facing).

Type: The image that will be used to locate the TextBox on the screen. The hotspot of the image must be set within the textbox border.

Type: [ ] Typically a filter indicating the area of interest for the image search.

Type:

Type:

Type: The name of the element that will be used for logging and reporting of exceptions (customer facing).

Type: The image that will be used to locate the TextBox on the screen. The hotspot of the image must be set within the textbox border.

Type: [ ] Typically a filter indicating the area of interest for the image search.

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.

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

Determines wether OCR or the clipboard shall be used to get or verify text in the textbox. Default:

Progile.TRIO.BaseModel.IAppBasics
BaseScreen
testerinterface
system interactions
String
ImageReference
IImageFilter
Select
ITester
ISystemHelpers
String
ImageReference
IImageFilter
Select
Object
Progile.TRIO.BaseModel.OnScreenElement
Hotspot
TextBoxType
ClickOutAfterType
ClickOutBeforeOCR
DefaultType
FloodFillTolerance
Source
Text
TextBoxOcrParas
TextBoxSelect
TextBoxType
DefaultType
RetryCount
PwTextBox.Enter()
ClickOutOfBox
Enter
EnterWithoutVerification
Enter
GetText
PasteText
VerifyText(String, String)
VerifyText(String)