Esempio n. 1
0
        private void setCandidate(string candidateName)
        {
            ListView candidates = windowTools.GetListView(window, SearchCriteria.ByAutomationId("listView"));

            //ListView candidates = (ListView)window.Items[16];
            ListViewRows rows           = candidates.Rows;
            bool         candidateFound = false;

            foreach (ListViewRow row in rows)
            {
                if (row.Cells[0].Name == candidateName)
                {
                    row.Select();
                    row.DoubleClick();
                    candidateFound = true;
                    break;
                }
            }

            if (candidateFound == false)
            {
                rows[0].Select();
                rows[1].DoubleClick();
            }
        }
Esempio n. 2
0
        public In_ClientCaseSearch_SelectClient(Application application, string clientName)
        {
            WindowTools   windowTools = new WindowTools();
            List <Window> windows     = windowTools.GetWindows(application);

            Window      window   = windowTools.GetWindow(windows, "ClientCaseSearch");
            ListView    listView = windowTools.GetListView(window, SearchCriteria.ByAutomationId("listView"));
            ListViewRow result   = windowTools.SelectListViewRowName(listView, clientName);

            Assert.IsNotNull(result, "Client Name Not Found In ClientCaseSearch List View.");
            windowTools.DoubleClickIUItem(result);
        }
        public SelectFacility(Application application, string facilityName)
        {
            WindowTools windowTools = new WindowTools();

            Window      window = windowTools.GetWindow(application, "Select Facility");
            RadioButton facilityRadioButton = windowTools.GetRadioButton(window, SearchCriteria.ByAutomationId("facilityRadioButton"));

            windowTools.ClickIUIItem(facilityRadioButton);
            ListBox facilityFilter = windowTools.GetListBox(window, SearchCriteria.ByAutomationId("ListBox"));

            windowTools.SelectListBoxItem(facilityFilter, "Any");
            ListView    facilityList = windowTools.GetListView(window, SearchCriteria.ByAutomationId("listView"));
            ListViewRow row          = windowTools.SelectListViewRowName(facilityList, facilityName);

            windowTools.DoubleClickIUItem(row);
        }