public void SwitchMode(CalcMode mode) { this.MainWindow.Focus(); this.MainWindow.Keyboard.HoldKey(KeyboardInput.SpecialKeys.ALT); this.MainWindow.Keyboard.Enter(((int)mode).ToString()); this.MainWindow.Keyboard.LeaveKey(KeyboardInput.SpecialKeys.ALT); InteractionTimeout.Wait(1000); this.InitializeMisc(); }
public virtual IStepResult Precondition_OpenCalc(ITestData data) { base.AppWrapper = new ApplicationWrapper(this.TestData.AppPath); this.MainWindow = this.AppWrapper.GetWindow(title: this.TestData.MainWindowTitle); var result = new StepResult(); if (this.MainWindow == null) { LogicalFail("Window didn't open in specified time.", true); return(result); } InteractionTimeout.Wait(1000); return(result); }