public static async Task WaitForLogDisplayed(this TestAppInstance app, string expectedLog, string operationName = null, TimeSpan?timeout = null) { try { await app.WaitFor( () => app.IsLogDisplayed(expectedLog), operationName : operationName, timeout : timeout ); } catch (TimeoutException) { Console.WriteLine("Actually displayed log: '{0}'", app.GetDisplayedLog()); throw; } }