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
  • Click
  • ClickWithUpdateCheck
  • DoubleClick
  • Hover
  • IsActive
  • WaitForActive
  • WaitForActive()
  • WaitForActive(TimeSpan)
  • WaitForInactive
  • WaitForInactive()
  • WaitForInactive(TimeSpan)

Was this helpful?

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

Button Methods

Click

Clicks on the button. Verifies the click was successful with the specified verification and performs retries if necessary.

Syntax:

public void Click(
	Func<bool> verification
)

Parameters:

Parameter

Description

verification

Exceptions:

Exception

Condition

When the button could not be found on the screen.

When the Click could not be verified successfully after the configured amount of retries of the click.

ClickWithUpdateCheck

Clicks on the button and uses an update check in the provided filters as verification. Should only be used if no other verify method is applicable. If after the click no update is detected in the region defined by filters, retries are performed. Note: filters should be chosen so that hover / click effects of the button itself don't trigger the update.

Syntax:

public void ClickWithUpdateCheck(
        ImgDiffTolerance tolerance, 
        double timeoutInSec = 0, 
        params IImageFilter[] filters
)

Parameters:

Parameter

Description

tolerance

timeoutInSec

filters

Exceptions:

Exception

Condition

When the button could not be found on the screen.

When the Click could not be verified successfully after the configured amount of retries of the click.

DoubleClick

Performs a double click on the button. Wait time between the individual clicks is controlled by the optional parameter doubleClickDelay.

Syntax:

public void DoubleClick(
	Func<bool> verification,
	int doubleClickDelay = 50	
)

Parameters:

Parameter

Description

verification

[doubleClickDelay]

Exceptions:

Exception

Condition

When the button could not be found on the screen.

When the DoubleClick could not be verified successfully after the configured amount of retries of the click.

Hover

Moves the mouse over the button. Verifies the hover was successful with the specified verification and performs retries if necessary.

Syntax:

public void Hover(
	Func<bool> verification
)

Parameters:

Parameter

Description

verification

Exceptions:

Exception

Condition

When the button could not be found on the screen.

When the Hover could not be verified successfully after the configured amount of retries.

IsActive

Checks the state of the button. Returns true if the button is active, false if the button is inactive. Requires that images named "active" and "inactive" are present in the folder given as content.

Syntax:

public bool IsActive()

Return Value:

True, if the active representation of the button is found; false, if the inactive representation is found.

Exceptions:

Exception

Condition

When the button could not be found on the screen.

The found representation was not named "active" or "inactive"

WaitForActive

Overload List

Name

Description

Waits for the active status. Returns false if the status is not reached after the given waitTime

WaitForActive()

Syntax:

public bool WaitForActive()

Return Value:

Exceptions:

Exception

Condition

When the button could not be found on the screen.

The found representation was not named "active" or "inactive"

WaitForActive(TimeSpan)

Waits for the active status. Returns false if the status is not reached after the given waitTime.

Syntax:

public bool WaitForActive(
        TimeSpan waitTime
)

Parameters:

Parameter

Description

waitTime

Return Value:

True, if the active state was reached after waitTime, false otherwise.

Exceptions:

Exception

Condition

When the button could not be found on the screen.

The found representation was not named "active" or "inactive"

WaitForInactive

Overload List

Name

Description

Waits for the inactive status. Returns false if the status is not reached after waitTime

WaitForInactive()

Syntax:

public bool WaitForInactive()

Return Value:

Exceptions:

Exception

Condition

When the button could not be found on the screen.

The found representation was not named "active" or "inactive"

WaitForInactive(TimeSpan)

Waits for the inactive status. Returns false if the status is not reached after waitTime.

Syntax:

public bool WaitForInactive(
        TimeSpan waitTime
)

Parameters:

Parameter

Description

waitTime

Return Value:

True, if the inactive state was reached after waitTime, false otherwise.

Exceptions:

Exception

Condition

When the button could not be found on the screen.

The found representation was not named "active" or "inactive"

PreviousButtonNextButton Properties

Last updated 1 year ago

Was this helpful?

Type: <> The verification method (e.g. Click(element.WaitForAppear); or Click(() => element.WaitForStatus(true));

Type: How different a new image needs to be so that we will count it as an update.

Type: The time during which the screen is monitored for updates after the action, if not set is used.

Type: [] Generally a filter indicating the area of interest.

See also:

Type: <> The verification method (e.g. DoubleClick(element.WaitForAppear); or DoubleClick(() => element.WaitForStatus(true));

Type: The time to wait between the clicks.

Type: <> The verification method (e.g. Hover(element.WaitForAppear); or Hover(() => element.WaitForStatus(true));

Waits for the active status. Returns false if the status is not reached after .

Waits for the active status. Returns false if the status is not reached after .

True, if the active state was reached after , false otherwise.

Type: How long to wait until the Button should be active. Default value is

Waits for the inactive status. Returns false if the status is not reached after .

Waits for the inactive status. Returns false if the status is not reached after .

True, if the inactive state was reached after , false otherwise.

Type: How long to wait until the Button should be inactive. Default value is

Func
Boolean
ElementNotFoundException
InteractionFailedException
IImageFilter
Select
ElementNotFoundException
InteractionFailedException
Func
Boolean
Int32
ElementNotFoundException
InteractionFailedException
Func
Boolean
ElementNotFoundException
InteractionFailedException
ElementNotFoundException
InvalidOperationException
ElementNotFoundException
InvalidOperationException
ElementNotFoundException
InvalidOperationException
ElementNotFoundException
InvalidOperationException
ElementNotFoundException
InvalidOperationException
WaitForActive()
WaitForActive(Timespan)
WaitForInactive()
WaitForInactive(TimeSpan)
Double
TimeSpan
TimeSpan
ImgDiffTolerance
OnScreenElement.WaitTimeInSeconds
OnScreenElement.WaitTimeInSeconds
OnScreenElement.WaitTimeInSeconds
OnScreenElement.WaitTimeInSeconds
OnScreenElement.DefaultWaitTime
OnScreenElement.WaitTimeInSeconds
OnScreenElement.WaitTimeInSeconds
OnScreenElement.WaitTimeInSeconds
OnScreenElement.WaitTimeInSeconds
TesterMouseExtensions.DoubleClick