Class TestObjectExtensions
Class for extension methods of the TestObject class
public static class TestObjectExtensions
- Inheritance
-
TestObjectExtensions
- Inherited Members
Methods
WaitUntilEnabled<T>(T)
Waits until the test object becomes enabled or the timeout elapses. This method is useful for synchronizing your test with your application.
public static bool WaitUntilEnabled<T>(this T enabledProvider) where T : IEnabledProvider
Parameters
enabledProviderTthe test object to wait until it becomes enabled.
Returns
- bool
true if the test object is enabled before the timeout is reached; otherwise, false.
Type Parameters
TThe type of the test object.
Remarks
This overload uses a timeout of 20 seconds.
WaitUntilEnabled<T>(T, int)
Waits until the test object becomes enabled or the timeout elapses. This method is useful for synchronizing your test with your application.
public static bool WaitUntilEnabled<T>(this T enabledProvider, int timeout) where T : IEnabledProvider
Parameters
enabledProviderTthe test object to wait until it becomes enabled.
timeoutintTimeout (in milliseconds) to wait until the test object becomes enabled.
Returns
- bool
true if the test object is enabled before the timeout is reached; otherwise, false.
Type Parameters
TThe type of the test object.
WaitUntilExists<T>(T)
Waits until the test object exists or the timeout elapses. This method is useful for synchronizing your test with your application.
public static bool WaitUntilExists<T>(this T testObject) where T : ITestObject
Parameters
testObjectTthe test object to wait until it exists.
Returns
- bool
true if the test object exists before the timeout is reached; otherwise, false.
Type Parameters
TThe type of the test object.
Remarks
This overload uses the default object synchronization timeout.
WaitUntilExists<T>(T, int)
Waits until the test object exists or the timeout elapses. This method is useful for synchronizing your test with your application.
public static bool WaitUntilExists<T>(this T testObject, int timeout) where T : ITestObject
Parameters
testObjectTthe test object to wait until it exists.
timeoutintTimeout (in seconds) to wait until the test object exists.
Returns
- bool
true if the test object exists before the timeout is reached; otherwise, false.
Type Parameters
TThe type of the test object.
WaitUntilVisible<T>(T)
Waits until the test object becomes visible or the timeout elapses. This method is useful for synchronizing your test with your application.
public static bool WaitUntilVisible<T>(this T visibleProvider) where T : IVisibleProvider
Parameters
visibleProviderTthe test object to wait until it becomes visible.
Returns
- bool
true if the test object is visible before the timeout is reached; otherwise, false.
Type Parameters
TThe type of the test object.
Remarks
This overload uses a timeout of 20 seconds.
WaitUntilVisible<T>(T, int)
Waits until the test object becomes visible or the timeout elapses. This method is useful for synchronizing your test with your application.
public static bool WaitUntilVisible<T>(this T visibleProvider, int timeout) where T : IVisibleProvider
Parameters
visibleProviderTthe test object to wait until it becomes visible.
timeoutintTimeout (in milliseconds) to wait until the test object becomes visible.
Returns
- bool
true if the test object is visible before the timeout is reached; otherwise, false.
Type Parameters
TThe type of the test object.
WaitUntil<T>(T, Func<T, bool>)
Waits until a certain condition is met in the specified boolean function or the timeout elapses. This method is useful for synchronizing your test with your application.
public static bool WaitUntil<T>(this T testObject, Func<T, bool> funcToRun) where T : ITestObject
Parameters
testObjectTThe test object that is passed to the funcToRun function.
funcToRunFunc<T, bool>A function returning a boolean result. The function runs until the function result is true, or until the object synchronization timeout elapses.
Returns
- bool
Boolean value returned from the funcToRun function.
Type Parameters
TA class implementing ITestObject
Remarks
This overload uses the default object synchronization timeout.
WaitUntil<T>(T, Func<T, bool>, int)
Waits until a certain condition is met in the specified boolean function or the timeout elapses. This method is useful for synchronizing your test with your application.
public static bool WaitUntil<T>(this T testObject, Func<T, bool> funcToRun, int totalTimeOutTime) where T : ITestObject
Parameters
testObjectTThe test object that is passed to the funcToRun function.
funcToRunFunc<T, bool>A function returning a boolean result. The function runs until the function result is true, or until the specified timeout elapses.
totalTimeOutTimeintTimeout (in milliseconds) to wait until funcToRun function becomes true.
Returns
- bool
Boolean value returned from the funcToRun function.
Type Parameters
TA class implementing ITestObject
Remarks
This overload uses timeout specified in the totalTimeOutTime argument.