Skip to content

[Win]GetText.cs

Avrigeanu Laurian edited this page Apr 14, 2023 · 1 revision

GetText() : string

Parameters

None

Returns

  • string: The text retrieved from the active element if it is a TextBox. Returns an empty string if the active element is not a TextBox or if the text retrieval fails.

Remarks

  • This method implements a retry policy to handle exceptions and retry the operation a specified number of times with a specified time interval between attempts.
  • The retry policy handles any Exception thrown during the text retrieval process.
  • The retry count and the time span between attempts are defined by retryCount and RetryTimeSpan, respectively.
  • When an exception is caught during the execution, the method logs the error message and the number of retries left before reattempting the operation.
Clone this wiki locally