Beispiel #1
0
        // ------------------------------------------------------

        // For each special Action/Locator which have more than just value we create function to get the data so driver can use it easily, see sample of By X Y in Selenium
        // Locate By XY

        //TODO: use the AIV list of items
        public void GetLocateByXYValuesForDriver(out double X, out double Y)
        {
            // split the Value, do not create new param
            // all locate value need to be combined into string
            if (string.IsNullOrEmpty(ElementLocateValueForDriver))
            {
                X = 0;
                Y = 0;
            }
            else
            {
                string[] xy = ElementLocateValueForDriver.Split(',');
                if ((xy != null) && (xy.Count() > 1))
                {
                    if (!double.TryParse(xy[0].Split('=')[1], out X))
                    {
                        X = 0;
                    }
                    if (!double.TryParse(xy[1].Split('=')[1], out Y))
                    {
                        Y = 0;
                    }
                }
                else
                {
                    X = 0;
                    Y = 0;
                }
            }
        }
Beispiel #2
0
        // ------------------------------------------------------

        // For each special Action/Locator which have more than just value we create function to get the data so driver can use it easily, see sample of By X Y in Selenium
        // Locate By XY

        //TODO: use the AIV list of items
        public void GetLocateByXYValuesForDriver(out double X, out double Y)
        {
            // split the Value, do not create new param
            // all locate value need to be combined into string
            if (string.IsNullOrEmpty(ElementLocateValueForDriver))
            {
                X = 0;
                Y = 0;
            }
            else
            {
                string[] xy = ElementLocateValueForDriver.Split(',');

                X = int.Parse(xy[0].Replace("X=", ""));
                Y = int.Parse(xy[1].Replace("Y=", ""));
            }
        }