Skip to main content
All docs
V23.2
.NET Framework 4.5.2+

ApplicationContextExtensions.GetForm(IApplicationContext) Method

Provides access to API that allows you to manipulate a currently displayed form.

Namespace: DevExpress.EasyTest.Framework

Assembly: DevExpress.EasyTest.v23.2.dll

NuGet Package: DevExpress.EasyTest

Declaration

public static IEasyTestForm GetForm(
    this IApplicationContext context
)

Parameters

Name Type Description
context IApplicationContext

The application’s context.

Returns

Type Description
IEasyTestForm

The API that allows you to manipulate a currently displayed form.

Remarks

The code sample below demonstrates a test code that logs in the tested application and navigates to a Roles view.

[Theory]
[InlineData(BlazorAppName)]
[InlineData(WinAppName)]
public void ValidateRole(string applicationName) {
    FixtureContext.DropDB(MainDemoDBName);
    var appContext = FixtureContext.CreateApplicationContext(applicationName);
    appContext.RunApplication();
    appContext.GetForm().FillForm(("User Name", "Sam"));
    appContext.GetAction("Log In").Execute();
    appContext.Navigate("Roles");

    // ...
}
See Also