示例#1
0
        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();
                }
            }
        }
示例#2
0
 public void StartAcessAutomation()
 {
     try
     {
         Webdriver web = new Webdriver("./", "./");
     }
     catch (Exception error)
     {
         Console.WriteLine(error.Message);
     }
 }
示例#3
0
        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";
        }
示例#4
0
 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;
 }
示例#5
0
 public void AccessURL()
 {
     Webdriver.Navigate().GoToUrl(strURL);
     IsPageDisplayed();
 }
示例#6
0
 private IWebElement lnkCarMake(string make) => Webdriver.FindElement(carMakeBy(make), 10);
示例#7
0
 private IWebElement lnkSelectedCar(string year, string make, string model) => Webdriver.FindElement(selectedCarBy(year, make, model), 5);
示例#8
0
 public void TearDown()
 {
     Webdriver.Quit();
 }