Example #1
0
 public void CheckXY()
 {
     //Тест №1
     LogOn();
     InputCoordWnd.get(driver).setLat(60, 50, 0).setLon(69, 59, 0).Click();
     //InputCoordinates();
     //Тест выполнил Петров,Балов.
 }
Example #2
0
        private void MoveExtent()
        {
            driver.FindElement(By.CssSelector(locationButtonXY)).Click();
            InputCoordWnd.get(driver).setLon(60, 50, 50).setLat(60, 50, 50).Click();
            driver.FindElement(By.CssSelector(locationButtonLinks)).Click();
            IWebElement elementTextArea = driver.FindElement(By.CssSelector(locationTextArea));
            string      fullLink        = elementTextArea.Text;
            int         idxExtentCoords = fullLink.IndexOf('=');

            idxExtentCoords++;
            string onlyExtentCoords = fullLink.Substring(idxExtentCoords);

            string[]            splitedExtentCoords = onlyExtentCoords.Split(',');
            IJavaScriptExecutor js         = driver as IJavaScriptExecutor;
            string onlyExtentCoordsCurrent = (string)js.ExecuteScript("return window.portal.stdmap.map.getExtent().toString()");

            string[] splitedExtentCoordsCurrent = onlyExtentCoordsCurrent.Split(',');
            for (int i = 0; i < 4; i++)
            {
                Assert.AreEqual(splitedExtentCoordsCurrent[i], splitedExtentCoords[i], "Текущий экстент карты не является корректным");
            }
        }