static void Main() { mouseDriven myMouse = new mouseDriven(); Webdriver selen = new Webdriver("http://www.google.com"); Camera cam = new Camera(myMouse, selen, false, 1, 10, -2, -20, 20, 0, 0); bool setup = true; cam.aTimer = new System.Timers.Timer(1); cam.aTimer.Elapsed += cam.OnTimedEvent; cam.aTimer.AutoReset = true; Console.WriteLine("The timer should fire every {0} milliseconds.", cam.aTimer.Interval); cam.aTimer.Enabled = true; if (setup) //for debugging/keyboard, set this to false before compiling { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); PXCMSession session; pxcmStatus sts = PXCMSession.CreateInstance(out session); if (sts >= pxcmStatus.PXCM_STATUS_NO_ERROR) { Application.Run(new MainForm(session)); session.Dispose(); } } }
public void StartAcessAutomation() { try { Webdriver web = new Webdriver("./", "./"); } catch (Exception error) { Console.WriteLine(error.Message); } }
public void Create_Driver() { Cursor.Position = new Point(0, 0); driver = Webdriver.MakeDriver("chrome"); driver.Navigate().GoToUrl("http://store.demoqa.com/"); billingContactInfo = new Dictionary <string, string>(); billingContactInfo["First Name"] = "Ashton"; billingContactInfo["Last Name"] = "Szabo"; billingContactInfo["Address"] = "0000 SomePlace Ln"; billingContactInfo["City"] = "SomeCity"; billingContactInfo["State/Province"] = "SomeState"; billingContactInfo["Country"] = "USA"; billingContactInfo["Postal Code"] = "SomeZip"; billingContactInfo["Phone"] = "SomeNumber"; }
public Camera(mouseDriven mou, Webdriver selen, bool mode, int cfgSens, float cfgUp, float cfgDown, float cfgLeft, float cfgRight, float cfgTiltLeft, float cfgTiltRight) { mouse = mou; selenium = selen; this.Configure(); Console.WriteLine("Camera constructor"); useMouse = mode; if (!canUseMouse) { useMouse = false; } mouseSens = cfgSens; upLimit = cfgUp; downLimit = cfgDown; leftLimit = cfgLeft; rightLimit = cfgRight; tiltLeftLimit = cfgTiltLeft; tiltRightLimit = cfgTiltRight; }
public void AccessURL() { Webdriver.Navigate().GoToUrl(strURL); IsPageDisplayed(); }
private IWebElement lnkCarMake(string make) => Webdriver.FindElement(carMakeBy(make), 10);
private IWebElement lnkSelectedCar(string year, string make, string model) => Webdriver.FindElement(selectedCarBy(year, make, model), 5);
public void TearDown() { Webdriver.Quit(); }