internal override void Execute(CefSharpDriver driver, Dictionary <string, bool> modifyKeys) { if (!Enum.TryParse <MouseButtonType>(button, out var buttonType)) { return; } var mouse = new MouseEmulator(driver.App); mouse.Up(buttonType); }
internal override void Execute(CefSharpDriver driver, Dictionary <string, bool> modifyKeys) { if (KeySpec.IsModifyKey(value)) { modifyKeys.Remove(value); KeySpec.SimpleKeyUp(driver.App, value); } if (KeySpec.IsAzOrNumber(value)) { KeySpec.SimpleKeyUp(driver.App, value); } }
internal override void Execute(CefSharpDriver driver, Dictionary <string, bool> modifyKeys) { var mouse = new MouseEmulator(driver.App); if (target == null) { var pos = System.Windows.Forms.Cursor.Position; pos.Offset(x, y); mouse.Move(pos); } else { var pos = driver.PointToScreen(target.Location); var size = target.Size; pos.Offset(size.Width / 2, size.Height / 2); pos.Offset(x, y); mouse.Move(pos); } }
public void TestInitialize() { //start process. var process = Process.Start(ProcessPath); //attach by friendly. _app = new WindowsAppFriend(process); //show next dialog. var mainWindow = _app.WaitForIdentifyFromTypeFullName("SampleApp.MainWindow"); var button = new WPFButtonBase(mainWindow.Dynamic()._buttonNextDialog); button.EmulateClick(new Async()); //get next dialog. var nextDialog = _app.WaitForIdentifyFromTypeFullName("SampleApp.NextDialog"); //create driver. _driver = new CefSharpDriver(nextDialog.Dynamic()._browser); }
public void TestInitialize() { //start process. var dir = GetType().Assembly.Location; for (int i = 0; i < 4; i++) { dir = Path.GetDirectoryName(dir); } var processPath = Path.Combine(dir, @"CefSharpWPFSample\bin\x86\Debug\CefSharpWPFSample.exe"); var process = Process.Start(processPath); //attach by friendly. _app = new WindowsAppFriend(process); var main = _app.Type <Application>().Current.MainWindow; //create driver. _driver = new CefSharpDriver(main._browser); _driver.Url = this.GetHtmlUrl(); }
public Navigation(CefSharpDriver driver) => _this = driver;
public void OneTimeSetUp() => _driver = AppRunner.RunWpfApp();
public void OneTimeSetUp() => _driver = AppRunner.RunWinFormApp();
internal virtual void Execute(CefSharpDriver driver, Dictionary <string, bool> modifyKeys) { }