C# Класс White.Core.Application

Represents a process which contains windows.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Attach ( Process process ) : Application

Attaches with existing process

Attach ( int processId ) : Application

Creates an Application object for existing process

Attach ( string executable ) : Application

Attaches with existing process

AttachOrLaunch ( ProcessStartInfo processStartInfo ) : Application

Attaches to the process if it is running or launches a new process

Close ( ) : void

Tries to find the main window, then close it. If it hasn't closed in 5 seconds, kill the process

Dispose ( ) : void
Equals ( object obj ) : bool

Two applications are equal if they have the same process

Find ( Predicate match, White.Core.Factory.InitializeOption initializeOption ) : White.Core.UIItems.WindowItems.Window

Looks at all the windows visible for the application and finds one which matches the condition. The match is run against the title of the windows

FindSplash ( ) : White.Core.UIItems.WindowItems.Window
GetHashCode ( ) : int
GetWindow ( White.Core.UIItems.Finders.SearchCriteria searchCriteria, White.Core.Factory.InitializeOption initializeOption ) : White.Core.UIItems.WindowItems.Window

Find the first window which belongs to this application and satisfies the critera.

GetWindow ( string title ) : White.Core.UIItems.WindowItems.Window

Get visible window

GetWindow ( string title, White.Core.Factory.InitializeOption option ) : White.Core.UIItems.WindowItems.Window

Get visible window

GetWindows ( ) : List

All windows belonging to the application

Kill ( ) : void

Kills the applications and waits till it is closed

KillAndSaveState ( ) : void

Kills the application. Read Application.Kill. It also saves the application test execution state. This saves the position of the window UIItems which would be loaded next time automatically for improved performance. You would need to use InitializedOption.AndIdentifiedBy for specifying the identification of window.

Launch ( ProcessStartInfo processStartInfo ) : Application

Lauches the process and creates and Application object for it

Launch ( string executable ) : Application

Runs the process identified by the executable and creates Application object for this executable

WaitWhileBusy ( ) : void

Waits till application is busy.

Защищенные методы

Метод Описание
Application ( ) : System

Приватные методы

Метод Описание
Application ( Process process ) : System
ReplaceLast ( string replaceIn, string replace, string with ) : string

Описание методов

Application() защищенный Метод

protected Application ( ) : System
Результат System

Attach() публичный статический Метод

Attaches with existing process
public static Attach ( Process process ) : Application
process System.Diagnostics.Process
Результат Application

Attach() публичный статический Метод

Creates an Application object for existing process
public static Attach ( int processId ) : Application
processId int
Результат Application

Attach() публичный статический Метод

Attaches with existing process
public static Attach ( string executable ) : Application
executable string
Результат Application

AttachOrLaunch() публичный статический Метод

Attaches to the process if it is running or launches a new process
public static AttachOrLaunch ( ProcessStartInfo processStartInfo ) : Application
processStartInfo System.Diagnostics.ProcessStartInfo
Результат Application

Close() публичный Метод

Tries to find the main window, then close it. If it hasn't closed in 5 seconds, kill the process
public Close ( ) : void
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Equals() публичный Метод

Two applications are equal if they have the same process
public Equals ( object obj ) : bool
obj object
Результат bool

Find() публичный Метод

Looks at all the windows visible for the application and finds one which matches the condition. The match is run against the title of the windows
public Find ( Predicate match, White.Core.Factory.InitializeOption initializeOption ) : White.Core.UIItems.WindowItems.Window
match Predicate
initializeOption White.Core.Factory.InitializeOption option for the window which matches the condition
Результат White.Core.UIItems.WindowItems.Window

FindSplash() публичный Метод

public FindSplash ( ) : White.Core.UIItems.WindowItems.Window
Результат White.Core.UIItems.WindowItems.Window

GetHashCode() публичный Метод

public GetHashCode ( ) : int
Результат int

GetWindow() публичный Метод

Find the first window which belongs to this application and satisfies the critera.
public GetWindow ( White.Core.UIItems.Finders.SearchCriteria searchCriteria, White.Core.Factory.InitializeOption initializeOption ) : White.Core.UIItems.WindowItems.Window
searchCriteria White.Core.UIItems.Finders.SearchCriteria
initializeOption White.Core.Factory.InitializeOption found window would be initialized with this option
Результат White.Core.UIItems.WindowItems.Window

GetWindow() публичный Метод

Get visible window
public GetWindow ( string title ) : White.Core.UIItems.WindowItems.Window
title string Title text of window displayed on desktop
Результат White.Core.UIItems.WindowItems.Window

GetWindow() публичный Метод

Get visible window
public GetWindow ( string title, White.Core.Factory.InitializeOption option ) : White.Core.UIItems.WindowItems.Window
title string Title text of window displayed on desktop
option White.Core.Factory.InitializeOption Option which would be used to initialize the window.
Результат White.Core.UIItems.WindowItems.Window

GetWindows() публичный Метод

All windows belonging to the application
public GetWindows ( ) : List
Результат List

Kill() публичный Метод

Kills the applications and waits till it is closed
public Kill ( ) : void
Результат void

KillAndSaveState() публичный Метод

Kills the application. Read Application.Kill. It also saves the application test execution state. This saves the position of the window UIItems which would be loaded next time automatically for improved performance. You would need to use InitializedOption.AndIdentifiedBy for specifying the identification of window.
public KillAndSaveState ( ) : void
Результат void

Launch() публичный статический Метод

Lauches the process and creates and Application object for it
public static Launch ( ProcessStartInfo processStartInfo ) : Application
processStartInfo System.Diagnostics.ProcessStartInfo
Результат Application

Launch() публичный статический Метод

Runs the process identified by the executable and creates Application object for this executable
public static Launch ( string executable ) : Application
executable string location of the executable
Результат Application

WaitWhileBusy() публичный Метод

Waits till application is busy.
public WaitWhileBusy ( ) : void
Результат void