public static API_WebScarab setInterface_Lite(this API_WebScarab webScarab) { if (webScarab.LiteMode) { "in API_WebScarab setInterface_Lite, we are already using the 'Lite' Interface, aborting request".error(); return(webScarab); } //API_InputSimulator_NativeMethods.MoveWindow(windowHandle,0,0,600,400,true); webScarab.bringToFront(); webScarab.InputSimulator.set_XY_OffsetToWindow(webScarab.WebScarab_Process); // this will make the mouse_MoveTo below to be relative to the current webscarab window // open menu webScarab.InputSimulator.mouse_MoveTo(20, 30).click(); //move to 'Use Lite Interface' Menu Item webScarab.InputSimulator.mouse_MoveTo(90, 30); webScarab.InputSimulator.mouse_MoveTo(90, 220).click(); // Press Ok webScarab.InputSimulator.send_Tab(); webScarab.InputSimulator.send_Enter(); // webScarab.InputSimulator.mouse_MoveTo(390,215).click(); // click 'exit' menu item webScarab.InputSimulator.mouse_MoveTo(20, 30).click(); webScarab.InputSimulator.mouse_MoveTo(20, 120).click(); webScarab.waitForExit(); return(webScarab); }
public static API_WebScarab setInterface_FullFeatured(this API_WebScarab webScarab) { if (webScarab.LiteMode.isFalse()) { "in API_WebScarab setInterface_FullFeatured, we are already using the 'FullFeatured(' Interface, aborting request".error(); return(webScarab); } //var windowHandle = webScarab.WebScarab_Process.MainWindowHandle; //WindowsInput.Native.NativeMethods.SetForegroundWindow(windowHandle); //API_InputSimulator_NativeMethods.MoveWindow(windowHandle,0,0,600,400,true); webScarab.bringToFront(); webScarab.InputSimulator.set_XY_OffsetToWindow(webScarab.WebScarab_Process); // this will make the mouse_MoveTo below to be relative to the current webscarab window // open menu webScarab.InputSimulator.mouse_MoveTo(20, 30).click(); //move to 'Use Full_Featured Interface' Menu Item webScarab.InputSimulator.mouse_MoveTo(90, 30); webScarab.InputSimulator.mouse_MoveTo(90, 150).click(); // Press Ok webScarab.InputSimulator.send_Tab(); webScarab.InputSimulator.send_Enter(); // webScarab.InputSimulator.mouse_MoveTo(390,215).click(); // click 'exit' menu item webScarab.InputSimulator.mouse_MoveTo(20, 30).click(); webScarab.InputSimulator.mouse_MoveTo(20, 120).click(); webScarab.waitForExit(); return(webScarab); }
public static API_WebScarab stop(this API_WebScarab webScarab) { if (webScarab.WebScarab_Process.notNull()) { webScarab.WebScarab_Process.stop(); webScarab.waitForExit(); webScarab.WebScarab_Process = null; } return(webScarab); }