I've created a class for this ExtensionExecution.cs and I've added it to my project which has .tstest files.
I'm having some trouble, first I can't tell if it's actually ever running the code, and secondly the code looks like it wouldn't work anyway.
The goal is to make sure that the test logs out properly regardless of whether it passed or failed. So I'm using OnAfterTestCompleted and trying to find the logout element on the screen and click it.
Essentially my class looks like:
public class ExtensionExecutions : IExecutionExtension
public void OnAfterTestCompleted(ExecutionContext executionContext, TestResult result)
ActiveBrowser.Find.ByContent("l:Log out", FindContentType.TextContent).Click();
But ActiveBrowser apparently doesn't exist in this context.
I'm not married to this particular implementation. But I'd like to be able to log out as a post test action. Can you help me out here? The logout button is defined on some pages so if that helps that is available.