예제 #1
0
 public static bool ClickThis(this Ranorex.Container item)
 {
     System.Threading.Thread.Sleep(200);
     item.Click();
     System.Threading.Thread.Sleep(200);
     return(true);
 }
예제 #2
0
        public static void Fetching_Test_Device_Options()
        {
            TestDeviceOption_list.Clear();
            TestDeviceDefault_list.Clear();
            Ranorex.Container    TestDevice_Elements = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container[@automationid='PART_ExtendedScrollViewer']/container";
            IList <UIAutomation> Elements_List       = TestDevice_Elements.FindChildren <UIAutomation>();

            for (int i = 0; i <= Elements_List.Count - 1; i++)
            {
                if (Elements_List[i].Name == "P1" || Elements_List[i].Name == "P2" || Elements_List[i].Name == "P3" || Elements_List[i].Name == "P4")
                {
                    string _testdevice_Option = Elements_List[i].Name;
                    _testdevice_Option = _testdevice_Option.Replace("P", "Program ");
                    TestDeviceOption_list.Add(_testdevice_Option);
                }
            }
            IList <ComboBox> Combobox_List = TestDevice_Elements.FindChildren <ComboBox>();

            for (int j = 0; j <= Combobox_List.Count - 1; j++)
            {
                int _combobox_number            = j + 1;
                Ranorex.ComboBox Comb_Text      = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/container/combobox[" + _combobox_number + "]";
                string           _combobox_text = Comb_Text.Text;
                _combobox_text = _combobox_text.Replace("Full On Gain", "FOG").Replace("Reference Test Gain", "RTG").Replace("Telecoil", "T-Coil");
                TestDeviceDefault_list.Add(_combobox_text);
            }
        }
예제 #3
0
 public static void RightClick(this Ranorex.Container item)
 {
     try
     {
         Mouse.Click(item, System.Windows.Forms.MouseButtons.Right, new Point(30, 10));
     }
     catch (Exception ex)
     {
         throw new Exception("Container Right Click Failed : " + ex.Message);
     }
 }
예제 #4
0
 public static void ClickThis(this Ranorex.Container item)
 {
     try
     {
         item.Click();
         Sleep();
     }
     catch (Exception ex)
     {
         throw new Exception("Container Click Failed : " + ex.Message);
     }
 }
예제 #5
0
        //**********************************************************************
        /// <summary>
        /// RightClick to given items in the comoponet like Container.
        /// </summary>
        public static void RightClick_Item(LxScriptItem item)
        {
            object       objComponet     = item.getComponent();
            RepoItemInfo objComponetInfo = item.getComponentInfo();
            Type         objType         = objComponet.GetType();

            if (objType.Name.ToString() == "Container")
            {
                Ranorex.Container targetContainer = objComponetInfo.CreateAdapter <Ranorex.Container>(true);
                targetContainer.Click(System.Windows.Forms.MouseButtons.Right);
                // Mouse.ButtonDown(System.Windows.Forms.MouseButtons.Right);
            }
        }
        public static void Select_Device(string devicename)
        {
            Ranorex.Text      DeviceselectionTextbox = "/form[@name~'Smart Fit' or @name~'Launcher' or @name~'Solus Max' or @name~'Interton Fitting' or @name~'Audigy' or @name~'Costco' or @classname='Window']/text";
            Ranorex.Container DeviceContainer        = "/contextmenu[@processname~'SmartFit' or @processname~'SolusMax' or @processname~'Audigy' or @processname~'Interton']/list/container/container";
            IList <ListItem>  txtlistitem            = DeviceContainer.FindChildren <ListItem>();

            for (int i = 0; i <= txtlistitem.Count - 1; i++)
            {
                int j = i + 1;
                Ranorex.ListItem device = "/contextmenu[@processname~'SmartFit' or @processname~'SolusMax' or @processname~'Audigy' or @processname~'Interton']/list/container/container/listitem[" + j + "]";
                string           k      = device.Text;
                if (devicename == k || k == DeviceselectionTextbox.TextValue)
                {
                    Mouse.Click(device);
                    break;
                }
            }
        }
예제 #7
0
 public static bool RightClick(this Ranorex.Container item)
 {
     Mouse.Click(item, System.Windows.Forms.MouseButtons.Right, new Point(30, 10));
     return(true);
 }
예제 #8
0
        public static void Fetching_UserPreference_DefaultValues(string buildname)
        {
            FSW_UserPreference_Default_List.Clear();
            int _comboboxCount  = 0;
            int _buttonCount    = 0;
            int _ContainerCount = 0;

            buildname = buildname.Replace(" ", string.Empty);
            buildname = buildname.ToLower();
            if (buildname.Contains("smartfit"))
            {
                Ranorex.Container    Container_UserPrefernces = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container[@automationid='PART_ExtendedScrollViewer']";
                IList <UIAutomation> C_List = Container_UserPrefernces.FindChildren <UIAutomation>();
                for (int i = 0; i <= C_List.Count - 4; i++)
                {
                    if (C_List[i].ControlType == "ComboBox")
                    {
                        int ComboboxNumber = _comboboxCount + 1;
                        if (ComboboxNumber == 1)
                        {
                            Ranorex.ComboBox seletedcombobox = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/combobox[" + ComboboxNumber + "]";
                            _comboboxCount++;
                        }
                        else
                        {
                            Ranorex.ComboBox seletedcombobox = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/combobox[" + ComboboxNumber + "]";
                            if (seletedcombobox.Text == "Fitting Screen:  Gain Adjustment")
                            {
                                FSW_UserPreference_Default_List.Add("Fit Screen:  Gain Adjustment");
                            }
                            else if (seletedcombobox.Text == "Enter in Simulation Mode")
                            {
                                FSW_UserPreference_Default_List.Add("Connect Manually");
                            }
                            else
                            {
                                FSW_UserPreference_Default_List.Add(seletedcombobox.Text);
                            }
                            _comboboxCount++;
                        }
                    }

                    if (C_List[i].ControlType == "Group")
                    {
                        int ContainerNumber                  = _ContainerCount + 1;
                        Ranorex.Container ContainetTxT       = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container[@automationid='PART_ExtendedScrollViewer']/container[" + ContainerNumber + "]";
                        IList <ComboBox>  Container_Combobox = ContainetTxT.FindChildren <ComboBox>();
                        IList <Button>    Container_Button   = ContainetTxT.FindChildren <Button>();
                        if (C_List[i].Name != "Default Environmental Programs:")
                        {
                            FSW_UserPreference_Default_List.Add("Yes");
                        }
                        for (int j = 0; j <= Container_Combobox.Count - 1; j++)
                        {
                            int j1 = j + 1;
                            Ranorex.ComboBox seletedcombobox = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/container[" + ContainerNumber + "]/combobox[" + j1 + "]";
                            FSW_UserPreference_Default_List.Add(seletedcombobox.Text);
                        }
                        for (int k = 0; k <= Container_Button.Count - 1; k++)
                        {
                            int k1 = k + 1;
                            if (k1 == 1)
                            {
                                Ranorex.Button selectedButton = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/container[" + ContainerNumber + "]/button[" + k1 + "]";
                                //	FSW_UserPreference_Default_List.Add(selectedButton.Text);
                                if (selectedButton.Pressed == true)
                                {
                                    FSW_UserPreference_Default_List.Add("Yes");
                                }
                                else
                                {
                                    FSW_UserPreference_Default_List.Add("No");
                                }
                            }
                            if (k1 == 2)
                            {
                                Ranorex.Button selectedButton = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/container[" + ContainerNumber + "]/button[" + k1 + "]";

                                if (selectedButton.Pressed == true)
                                {
                                    FSW_UserPreference_Default_List.Add("Yes");
                                }
                                else
                                {
                                    FSW_UserPreference_Default_List.Add("No");
                                }
                            }
                        }



                        _ContainerCount++;
                    }
                    if (C_List[i].ControlType == "Button")
                    {
                        int            ButtonNumber  = _buttonCount + 1;
                        Ranorex.Button seletedButton = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/button[" + ButtonNumber + "]";


                        if (seletedButton.Pressed == true)
                        {
                            FSW_UserPreference_Default_List.Add("Yes");
                        }
                        else
                        {
                            FSW_UserPreference_Default_List.Add("No");
                        }
                        _buttonCount++;
                    }
                }
            }
            else if (buildname.Contains("solusmax") || buildname.Contains("audigy"))
            {
                Ranorex.Container    Container_UserPrefernces = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container[@automationid='PART_ExtendedScrollViewer']";
                IList <UIAutomation> C_List = Container_UserPrefernces.FindChildren <UIAutomation>();
                for (int i = 0; i <= C_List.Count - 4; i++)
                {
                    if (C_List[i].ControlType == "ComboBox")
                    {
                        int ComboboxNumber = _comboboxCount + 1;
                        if (ComboboxNumber == 1)
                        {
                            Ranorex.ComboBox seletedcombobox = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/combobox[" + ComboboxNumber + "]";
                            _comboboxCount++;
                        }
                        else
                        {
                            Ranorex.ComboBox seletedcombobox = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/combobox[" + ComboboxNumber + "]";
                            if (seletedcombobox.Text == "Fitting Screen:  Gain Adjustment")
                            {
                                FSW_UserPreference_Default_List.Add("Fit Screen:  Gain Adjustment");
                            }
                            else if (seletedcombobox.Text == "Enter in Simulation Mode")
                            {
                                FSW_UserPreference_Default_List.Add("Connect Manually");
                            }
                            else
                            {
                                FSW_UserPreference_Default_List.Add(seletedcombobox.Text);
                            }
                            _comboboxCount++;
                        }
                    }

                    if (C_List[i].ControlType == "Group")
                    {
                        int ContainerNumber                  = _ContainerCount + 1;
                        Ranorex.Container ContainetTxT       = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container[@automationid='PART_ExtendedScrollViewer']/container[" + ContainerNumber + "]";
                        IList <ComboBox>  Container_Combobox = ContainetTxT.FindChildren <ComboBox>();
                        IList <Button>    Container_Button   = ContainetTxT.FindChildren <Button>();
                        if (C_List[i].Name != "Default Environmental Programs:")
                        {
                            FSW_UserPreference_Default_List.Add("Yes");
                        }
                        for (int j = 0; j <= Container_Combobox.Count - 1; j++)
                        {
                            int j1 = j + 1;
                            Ranorex.ComboBox seletedcombobox = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/container[" + ContainerNumber + "]/combobox[" + j1 + "]";
                            FSW_UserPreference_Default_List.Add(seletedcombobox.Text);
                        }
                        for (int k = 0; k <= Container_Button.Count - 1; k++)
                        {
                            int k1 = k + 1;
                            if (k1 == 1)
                            {
                                Ranorex.Button selectedButton = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/container[" + ContainerNumber + "]/button[" + k1 + "]";
                                //	FSW_UserPreference_Default_List.Add(selectedButton.Text);
                                if (selectedButton.Pressed == true)
                                {
                                    FSW_UserPreference_Default_List.Add("Yes");
                                }
                                else
                                {
                                    FSW_UserPreference_Default_List.Add("No");
                                }
                            }
                            if (k1 == 2)
                            {
                                Ranorex.Button selectedButton = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/container[" + ContainerNumber + "]/button[" + k1 + "]";

                                if (selectedButton.Pressed == true)
                                {
                                    FSW_UserPreference_Default_List.Add("Yes");
                                }
                                else
                                {
                                    FSW_UserPreference_Default_List.Add("No");
                                }
                            }
                        }



                        _ContainerCount++;
                    }
                    if (C_List[i].ControlType == "Button")
                    {
                        int            ButtonNumber  = _buttonCount + 1;
                        Ranorex.Button seletedButton = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/button[" + ButtonNumber + "]";


                        if (seletedButton.Pressed == true)
                        {
                            FSW_UserPreference_Default_List.Add("Yes");
                        }
                        else
                        {
                            FSW_UserPreference_Default_List.Add("No");
                        }
                        _buttonCount++;
                    }
                }
            }
        }
예제 #9
0
        public static void Fetching_UserPreference(string buildname)
        {
            FSW_UserPreference_List.Clear();
            buildname = buildname.Replace(" ", string.Empty);
            buildname = buildname.ToLower();
            if (buildname.Contains("smartfit"))
            {
                Ranorex.Container Container_UserPrefernces = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container[@automationid='PART_ExtendedScrollViewer']";
                IList <Container> txtContainer             = Container_UserPrefernces.FindChildren <Container>();

                IList <UIAutomation> C_List = Container_UserPrefernces.FindChildren <UIAutomation>();
                for (int i = 0; i <= C_List.Count - 1; i++)
                {
                    if (C_List[i].ControlType == "Group")
                    {
                        if (C_List[i].Name != "Default Environmental Programs:")
                        {
                            string fswPreference = C_List[i].Name;
                            if (fswPreference == "Remote Fine-tuning")
                            {
                                fswPreference = "Is RFT Visible in Preference Window";
                                FSW_UserPreference_List.Add(fswPreference);
                            }
                            else if (fswPreference == "Remote Hearing Aid Update")
                            {
                                fswPreference = "Is RFU Visible in Preference Window";
                                FSW_UserPreference_List.Add(fswPreference);
                            }
                            else
                            {
                                FSW_UserPreference_List.Add(fswPreference);
                            }
                        }
                        for (int j = 0; j <= txtContainer.Count - 1; j++)
                        {
                            if (C_List[i].Name == txtContainer[j].Caption)
                            {
                                string containerPreference = "";
                                int    k = j + 1;
                                if (k == 1)
                                {
                                    Ranorex.Container ContainetTxT = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit']/container[@automationid='PART_ExtendedScrollViewer']/container[" + k + "]";
                                    IList <Text>      innerText    = ContainetTxT.FindChildren <Text>();

                                    for (int r = 0; r <= innerText.Count - 2; r++)
                                    {
                                        containerPreference = innerText[r].Caption;
                                        if (containerPreference == "1." || containerPreference == "2." || containerPreference == "3." || containerPreference == "4.")
                                        {
                                            containerPreference = containerPreference.Replace(".", string.Empty);
                                            containerPreference = "Default Program " + containerPreference;
                                            FSW_UserPreference_List.Add(containerPreference);
                                        }
                                        else
                                        {
                                            FSW_UserPreference_List.Add(containerPreference);
                                        }
                                    }
                                }
                                else if (k == 2)
                                {
                                    Ranorex.Container ContainetTxT = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit']/container[@automationid='PART_ExtendedScrollViewer']/container[" + k + "]";
                                    IList <Text>      innerText    = ContainetTxT.FindChildren <Text>();
                                    for (int r = 0; r <= innerText.Count - 2; r++)
                                    {
                                        containerPreference = innerText[r].Caption;
                                        if (containerPreference == "Enable Remote Fine-tuning")
                                        {
                                            containerPreference = "Is RFT Enabled";
                                            FSW_UserPreference_List.Add(containerPreference);
                                        }
                                        else if (containerPreference == "Default Patient Setting")
                                        {
                                            containerPreference = "RFT Default Patient Setting";
                                            FSW_UserPreference_List.Add(containerPreference);
                                        }
                                        else
                                        {
                                            FSW_UserPreference_List.Add(containerPreference);
                                        }
                                    }
                                }
                                else if (k == 3)
                                {
                                    Ranorex.Container ContainetTxT = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit']/container[@automationid='PART_ExtendedScrollViewer']/container[" + k + "]";
                                    IList <Text>      innerText    = ContainetTxT.FindChildren <Text>();
                                    for (int r = 0; r <= innerText.Count - 2; r++)
                                    {
                                        containerPreference = innerText[r].Caption;
                                        if (containerPreference == "Enable Remote Hearing Aid Update")
                                        {
                                            containerPreference = "Is RFU Enabled";
                                            FSW_UserPreference_List.Add(containerPreference);
                                        }
                                        else if (containerPreference == "Enable Remote Hearing Aid Update")
                                        {
                                            containerPreference = "Is RFU Enabled";
                                            FSW_UserPreference_List.Add(containerPreference);
                                        }
                                        else if (containerPreference == "Default Patient Setting")
                                        {
                                            containerPreference = "RFU Default Patient Setting";
                                            FSW_UserPreference_List.Add(containerPreference);
                                        }
                                        else
                                        {
                                            FSW_UserPreference_List.Add(containerPreference);
                                        }
                                    }
                                }
                                else
                                {
                                    Ranorex.Container ContainetTxT = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit']/container[@automationid='PART_ExtendedScrollViewer']/container[" + k + "]";
                                    IList <Text>      innerText    = ContainetTxT.FindChildren <Text>();
                                    for (int r = 0; r <= innerText.Count - 2; r++)
                                    {
                                        containerPreference = innerText[r].Caption;
                                        FSW_UserPreference_List.Add(containerPreference);
                                    }
                                }
                            }
                        }
                    }
                    if (C_List[i].ControlType == "Text")
                    {
                        if (C_List[i].Name != "Default Language:")
                        {
                            string name = C_List[i].Name.Replace(":", string.Empty).Replace("*", string.Empty);
                            if (name == "Fine-tuning sessions launch to")
                            {
                                FSW_UserPreference_List.Add("Launch screen for Return Visits");
                            }
                            else if (name == "AutoRelate on Save")
                            {
                                FSW_UserPreference_List.Add("Prompt for AutoRelate on Save");
                            }
                            else if (name == "When navigating to Fitting screen")
                            {
                                FSW_UserPreference_List.Add("When Navigating to Fit screen");
                            }
                            else if (name == "Default Gain Level %")
                            {
                                FSW_UserPreference_List.Add("Gain Percentage of Target");
                            }
                            else if (name == "Mute instrument when Fitting")
                            {
                                FSW_UserPreference_List.Add("Mute HI when Fitting");
                            }
                            else
                            {
                                FSW_UserPreference_List.Add(name);
                            }
                        }
                    }
                }
            }
            else if (buildname.Contains("solusmax") || buildname.Contains("audigy"))
            {
                Ranorex.Container    Container_UserPrefernces = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container[@automationid='PART_ExtendedScrollViewer']";
                IList <Container>    txtContainer             = Container_UserPrefernces.FindChildren <Container>();
                IList <UIAutomation> C_List = Container_UserPrefernces.FindChildren <UIAutomation>();
                for (int i = 0; i <= C_List.Count - 1; i++)
                {
                    if (C_List[i].ControlType == "Group")
                    {
                        if (C_List[i].Name != "Default Environmental Programs:")
                        {
                            string fswPreference = C_List[i].Name;
                            if (fswPreference == "Remote Fine-tuning")
                            {
                                fswPreference = "Is RFT Visible in Preference Window";
                                FSW_UserPreference_List.Add(fswPreference);
                            }
                            else if (fswPreference == "Remote Hearing Aid Update")
                            {
                                fswPreference = "Is RFU Visible in Preference Window";
                                FSW_UserPreference_List.Add(fswPreference);
                            }
                            else
                            {
                                FSW_UserPreference_List.Add(fswPreference);
                            }
                        }
                        for (int j = 0; j <= txtContainer.Count - 1; j++)
                        {
                            if (C_List[i].Name == txtContainer[j].Caption)
                            {
                                string containerPreference = "";
                                int    k = j + 1;
                                if (k == 1)
                                {
                                    Ranorex.Container ContainetTxT = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container[@automationid='PART_ExtendedScrollViewer']/container[" + k + "]";
                                    IList <Text>      innerText    = ContainetTxT.FindChildren <Text>();

                                    for (int r = 0; r <= innerText.Count - 2; r++)
                                    {
                                        containerPreference = innerText[r].Caption;
                                        if (containerPreference == "1." || containerPreference == "2." || containerPreference == "3." || containerPreference == "4.")
                                        {
                                            containerPreference = containerPreference.Replace(".", string.Empty);
                                            containerPreference = "Default Program " + containerPreference;
                                            FSW_UserPreference_List.Add(containerPreference);
                                        }
                                        else
                                        {
                                            FSW_UserPreference_List.Add(containerPreference);
                                        }
                                    }
                                }
                                else if (k == 2)
                                {
                                    Ranorex.Container ContainetTxT = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container[@automationid='PART_ExtendedScrollViewer']/container[" + k + "]";
                                    IList <Text>      innerText    = ContainetTxT.FindChildren <Text>();
                                    for (int r = 0; r <= innerText.Count - 2; r++)
                                    {
                                        containerPreference = innerText[r].Caption;
                                        if (containerPreference == "Enable Remote Fine-tuning")
                                        {
                                            containerPreference = "Is RFT Enabled";
                                            FSW_UserPreference_List.Add(containerPreference);
                                        }
                                        else if (containerPreference == "Default Patient Setting")
                                        {
                                            containerPreference = "RFT Default Patient Setting";
                                            FSW_UserPreference_List.Add(containerPreference);
                                        }
                                        else
                                        {
                                            FSW_UserPreference_List.Add(containerPreference);
                                        }
                                    }
                                }

                                else
                                {
                                    Ranorex.Container ContainetTxT = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container[@automationid='PART_ExtendedScrollViewer']/container[" + k + "]";
                                    IList <Text>      innerText    = ContainetTxT.FindChildren <Text>();
                                    for (int r = 0; r <= innerText.Count - 2; r++)
                                    {
                                        containerPreference = innerText[r].Caption;
                                        FSW_UserPreference_List.Add(containerPreference);
                                    }
                                }
                            }
                        }
                    }
                    if (C_List[i].ControlType == "Text")
                    {
                        if (C_List[i].Name != "Default Language:")
                        {
                            string name = C_List[i].Name.Replace(":", string.Empty).Replace("*", string.Empty);
                            if (name == "Fine-tuning sessions launch to")
                            {
                                FSW_UserPreference_List.Add("Launch screen for Return Visits");
                            }
                            else if (name == "AutoRelate on Save")
                            {
                                FSW_UserPreference_List.Add("Prompt for AutoRelate on Save");
                            }
                            else if (name == "When navigating to Fitting screen")
                            {
                                FSW_UserPreference_List.Add("When Navigating to Fit screen");
                            }
                            else if (name == "Default Gain Level %")
                            {
                                FSW_UserPreference_List.Add("Gain Percentage of Target");
                            }
                            else if (name == "Mute instrument when Fitting")
                            {
                                FSW_UserPreference_List.Add("Mute HI when Fitting");
                            }
                            else
                            {
                                FSW_UserPreference_List.Add(name);
                            }
                        }
                    }
                }
            }
        }
        public static void Fetching_WebUpdates_Options(string Buildname)
        {
            Buildname = Buildname.Replace(" ", string.Empty);
            Buildname = Buildname.ToLower();
            WebElements_Count.Clear();
            WebElements_options.Clear();
            DefaultValues_WebElements.Clear();
            int checkboxCount  = 0;
            int comboboxCount  = 0;
            int checkboxCount2 = 0;

            Ranorex.Container    WebCon      = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container[@automationid='PART_ExtendedScrollViewer']/container";
            IList <UIAutomation> WebCon_List = WebCon.FindChildren <UIAutomation>();

            for (int i = 0; i <= WebCon_List.Count - 1; i++)
            {
                if (WebCon_List[i].ControlType == "CheckBox" || WebCon_List[i].ControlType == "ComboBox")
                {
                    WebElements_Count.Add(WebCon_List[i].ControlType);
                }
            }

            for (int k = 0; k <= WebElements_Count.Count - 1; k++)
            {
                if (WebElements_Count[k] == "CheckBox")
                {
                    int c3 = checkboxCount2 + 1;
                    Ranorex.CheckBox checkboxData = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/container/checkbox[" + c3 + "]";
                    //	WebElements_options.Add(checkboxData);
                    string Checkbox_text = checkboxData.Text;
                    if (Checkbox_text == "Check for updates on a scheduled interval")
                    {
                        //	WebElements_options.Add("Check Updates Interval");
                        WebElements_options.Add("Check For Updates Automatically");
                    }
                    else if (Checkbox_text == "Always download updates when available")
                    {
                        WebElements_options.Add("Download updates automatically");
                    }
                    else
                    {
                        WebElements_options.Add(Checkbox_text);
                    }
                    checkboxCount2++;
                }
                else if (WebElements_Count[k] == "ComboBox")
                {
                    if (Buildname.Contains("smartfit") || Buildname.Contains("audigy"))
                    {
                        WebElements_options.Add("Check Updates Interval");
                    }
                    else if (Buildname.Contains("solusmax"))
                    {
                        WebElements_options.Add("Week");
                    }
                    //	WebElements_options.Add("Check Updates Interval");
                }
            }
            for (int j = 0; j <= WebElements_Count.Count - 1; j++)
            {
                if (WebElements_Count[j] == "CheckBox")
                {
                    int c1 = checkboxCount + 1;
                    Ranorex.CheckBox txtChecked = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/container/checkbox[" + c1 + "]";
                    if (txtChecked.Checked == true)
                    {
                        DefaultValues_WebElements.Add("Yes");
                    }
                    else
                    {
                        DefaultValues_WebElements.Add("No");
                    }
                    checkboxCount++;
                }
                else if (WebElements_Count[j] == "ComboBox")
                {
                    int c2 = comboboxCount + 1;
                    Ranorex.ComboBox txtCombText = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/container/combobox[" + c2 + "]";
                    DefaultValues_WebElements.Add(txtCombText.Text);
                    comboboxCount++;
                }
            }
        }
        public static void Fetching_Machine_Preference()
        {
            int _ComboBoxCount = 0;

            FSW_MachinePreference_List.Clear();
            DefaultValues_MachinePreference_List.Clear();
            Ranorex.Container    Container_Machine_Prefernces = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container[@automationid='PART_ExtendedScrollViewer']";
            IList <UIAutomation> Machine_Preferncest_list     = Container_Machine_Prefernces.FindChildren <UIAutomation>();

            for (int i = 0; i <= Machine_Preferncest_list.Count - 4; i++)
            {
                string name = Machine_Preferncest_list[i].Name;
                if (name != null)
                {
                    //	fswprefernce=fswprefernce.Replace(" ",string.Empty);
                    //name=name.Replace(":",string.Empty);
                    name = name.Replace(":", string.Empty);
                    if (!(name == null || name == "Test" || name == "Parameters" || name == "Yes"))
                    {
                        //	FSW_MachinePreference_List.Add(Machine_Preferncest_list[i].Name);
                        if (name == "Pediatric Default Target Rule")
                        {
                            FSW_MachinePreference_List.Add("Default Pediatric Fitting Rule");
                        }
                        else if (name == "Default Experience")
                        {
                            FSW_MachinePreference_List.Add("Default Experience Level");
                        }
                        else if (name == "Show GN Online Services System Tray Icon")
                        {
                            FSW_MachinePreference_List.Add("System Tray Visibility");
                        }
                        else if (name == "Programming Interface")
                        {
                            FSW_MachinePreference_List.Add("Default Programming Interface");
                        }
                        else
                        {
                            FSW_MachinePreference_List.Add(name);
                        }
                    }
                }
            }
            ElementList_Count.Clear();
            for (int j = 0; j <= Machine_Preferncest_list.Count - 4; j++)
            {
                string elementname = Machine_Preferncest_list[j].ControlType;
                if (elementname == "ComboBox" || elementname == "CheckBox" || elementname == "Button")
                {
                    if (elementname == "Button")
                    {
                        if (Machine_Preferncest_list[j].Name == "Yes")
                        {
                            ElementList_Count.Add(elementname);
                        }
                    }
                    else
                    {
                        ElementList_Count.Add(elementname);
                    }
                }
            }

            for (int k = 0; k <= ElementList_Count.Count - 1; k++)
            {
                if (ElementList_Count[k] == "ComboBox")
                {
                    int m = _ComboBoxCount + 1;
                    //	int m=
                    Ranorex.ComboBox Comb_text = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/combobox[" + m + "]";
                    string           defvalue  = Comb_text.Text;
                    if (defvalue == "DSLv5 - Pediatric")
                    {
                        DefaultValues_MachinePreference_List.Add("DSLv5b - Pediatric");
                    }
                    else
                    {
                        DefaultValues_MachinePreference_List.Add(defvalue);
                    }
                    _ComboBoxCount++;
                }
                else if (ElementList_Count[k] == "CheckBox" || ElementList_Count[k] == "Button")
                {
                    if (ElementList_Count[k] == "CheckBox")
                    {
                        Ranorex.CheckBox checkedCondition = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/checkbox[@automationid='PART_UsePinCodeCheckBox']";
                        if (checkedCondition.Checked == true)
                        {
                            DefaultValues_MachinePreference_List.Add("Yes");
                        }
                        else
                        {
                            DefaultValues_MachinePreference_List.Add("No");
                        }
                    }
                    else if (ElementList_Count[k] == "Button")
                    {
                        Ranorex.Button btnpressedCondition = "/form[@classname='Window' and @orientation='None' and @processname='SmartFit' or @processname='SolusMax']/container/button[@automationid='PART_SegmentedToggleButton']";
                        if (btnpressedCondition.Pressed == true)
                        {
                            DefaultValues_MachinePreference_List.Add("Yes");
                        }
                        else
                        {
                            DefaultValues_MachinePreference_List.Add("No");
                        }
                    }
                }
            }
        }