tryFocusElement
Attempts to set input focus to the specified element in the background.
tryFocusElement(element?: TestOutputElement): void
Notes
- This method is used by the UI component renderer. To acquire input focus, use the UIComponent.requestFocus() method instead of calling this method directly.
- Use a poll function or TestCase.expectOutputAsync() to wait until the element has received input focus.
Parameters
- element — The output element to focus
Related
- class TestRendererA class that represents an in-memory application render context.