Change the inheritance from TestFeature to UiTest.
Before:
public class MyTest : TestFeature
{
}
After:
public class MyTest : UiTest
{
}
Change from RunScenario to Execute method
Before:
this.RunScenario(given => this.FirstStep(), then => this.SecondStep());
After:
this.Execute(this.TestCaseSteps);
The Execute method receives a delegate, this means that it can be a lambda or another method with an UiExecutionController as a parameter. If you have multiple steps in RunScenario these can be passed to a new method like this:
public void TestCaseSteps(UiExecutionController controller)
{
this.FirstStep(controller);
this.SecondStep(controller);
}
Change how to get the Page Objects
Now the methods need to explicitly receive an UiExecutionController as a parameter. This object is used to call the GetPageObject method. As follows:
A common pattern was to use a property to get the Page Object as follows:
public class MyTest : TestFeature
{
private MyPageObject MyPageObject => this.GetView<MyPageObject>();
}
This pattern is no longer supported because, with the new architecture, QualityMate can run more than one UiPlayer at the same time. An UiExecutionController is created on every Execute call and you need to explicitly get the PageObjects from it.
Change the way a configuration is modified before Execution