ApplicationContextExtensions.GetAction(IApplicationContext, String) Method
In This Article
Provides access to API that allows you to manipulate a specified Action.
Namespace: DevExpress.EasyTest.Framework
Assembly: DevExpress.EasyTest.v24.2.dll
NuGet Package: DevExpress.EasyTest
#Declaration
public static IEasyTestAction GetAction(
this IApplicationContext context,
string actionName
)
#Parameters
Name | Type | Description |
---|---|---|
context | IApplication |
The application’s context. |
action |
String | An Action’s name. |
#Returns
Type | Description |
---|---|
IEasy |
The API that allows you to manipulate a specified Action. Returns |
#Remarks
If a specified Action was not found, the GetAction
returns null
.
appContext.GetAction("Edit")?.Execute();
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