protected void CloseIfXamarinUpdateOpen() { try { Session.WaitForElement(IdeQuery.XamarinUpdate, 10 * 1000); TakeScreenShot("Xamarin-Update-Opened"); Session.ClickElement(c => IdeQuery.XamarinUpdate(c).Children().Button().Text("Close")); } catch (TimeoutException) { TestService.Session.DebugObject.Debug("Visual Studio Update did not open"); } }
public static bool Run(int timeoutSeconds = 20, int pollStepSecs = 5) { Session.ExecuteCommand(ProjectCommands.Run); try { Ide.WaitUntil( () => !Session.Query(c => IdeQuery.RunButton(c).Property("Icon", "Stop")).Any(), timeout: timeoutSeconds * 1000, pollStep: pollStepSecs * 1000); return(false); } catch (TimeoutException) { return(true); } }