Пример #1
0
        public UnitXAWE(IArclitePage page)
        {
            this.initPage();

            this.setElementXpaths();
            this.elementXpaths.ToList().ForEach(x => page.pageElements.Add(x.Key, x.Value));
        }
Пример #2
0
        public HomePageXAWE(IArclitePage page)
        {
            elementXpaths = new Dictionary <string, IArcliteWebElement>();

            homeOrderTracking = new KeyValuePair <string, IArcliteWebElement>("Home Tracking", new ArcliteTextBox("Home Tracking", "//a[@onclick=\"selectHeader('#arc-scheduler-sales')\"]"));
            homeScheduler     = new KeyValuePair <string, IArcliteWebElement>("Home Scheduler", new ArcliteTextBox("Home Scheduler", "//a[@onclick=\"selectHeader('#arc-scheduler-jobs')\"]"));
            homeWorkStation   = new KeyValuePair <string, IArcliteWebElement>("Home Workstation", new ArcliteButton("Home Workstation", "//a[@onclick=\"selectHeader('#arc-workstation')\"]"));
            homeDashboards    = new KeyValuePair <string, IArcliteWebElement>("Home Dashboards", new ArcliteTextBox("Home Dashboards", "//a[@onclick=\"selectHeader('#arc-dashboard')\"]"));
            homeWorkflows     = new KeyValuePair <string, IArcliteWebElement>("Home Workflows", new ArcliteTextBox("Home Workflows", "//a[@onclick=\"selectHeader('#arc-workflow-builder')\"]"));

            homeConfiguration = new KeyValuePair <string, IArcliteWebElement>("Home Configuration", new ArcliteButton("Home Configuration", "//a[@onclick=\"selectHeader('#arc-config')\"]"));

            this.setElementXpaths();
            this.elementXpaths.ToList().ForEach(x => page.pageElements.Add(x.Key, x.Value));
        }
        public ConfigurationXAWE(IArclitePage page)
        {
            elementXpaths = new Dictionary <string, IArcliteWebElement>();

            inventory = new KeyValuePair <string, IArcliteWebElement>("Inventory Page", new ArcliteButton("Inventory Page", "//a[@id='inventory']"));
            personnel = new KeyValuePair <string, IArcliteWebElement>("Personnel Page", new ArcliteButton("Personnel Page", "//a[@id='personnel']"));
            assets    = new KeyValuePair <string, IArcliteWebElement>("Assets Page", new ArcliteButton("Assets Page", "//a[@id='assets']"));
            customers = new KeyValuePair <string, IArcliteWebElement>("Customers Page", new ArcliteButton("Customers Page", "//a[@id='customer']"));
            suppliers = new KeyValuePair <string, IArcliteWebElement>("Suppliers Page", new ArcliteButton("Suppliers Page", "//a[@id='supplier']"));

            checklists = new KeyValuePair <string, IArcliteWebElement>("Checklists Page", new ArcliteButton("Checklists Page", "//a[@id='checklist']"));
            settings   = new KeyValuePair <string, IArcliteWebElement>("Settings Page", new ArcliteButton("Settings Page", "//a[@id='settings']"));

            this.setElementXpaths();
            this.elementXpaths.ToList().ForEach(x => page.pageElements.Add(x.Key, x.Value));
        }
        public ArcliteWebPageXAWE(IArclitePage page)
        {
            elementXpaths = new Dictionary <string, IArcliteWebElement>();

            home          = new KeyValuePair <string, IArcliteWebElement>("Home", new ArcliteButton("Home", "//a/i[@class='fa fa-home arc-fa-2x']"));
            orderTracking = new KeyValuePair <string, IArcliteWebElement>("Order Tracking & Manangement", new ArcliteButton("Order Tracking & Manangement", "//a[@id='arc-scheduler-sales']"));
            scheduler     = new KeyValuePair <string, IArcliteWebElement>("Scheduler", new ArcliteButton("Scheduler", "//a[@id='arc-scheduler-jobs']"));
            workstation   = new KeyValuePair <string, IArcliteWebElement>("Workstation", new ArcliteButton("Workstation", "//a[@id='arc-workstation']"));
            dashboard     = new KeyValuePair <string, IArcliteWebElement>("Dashboard", new ArcliteButton("Dashboard", "//a[@id='arc-dashboard']"));

            workflowBuilder = new KeyValuePair <string, IArcliteWebElement>("Workflow Builder", new ArcliteButton("Workflow Builder", "//a[@id='arc-workflow-builder']"));
            settings        = new KeyValuePair <string, IArcliteWebElement>("Configuration", new ArcliteButton("Configuration", "//a[@id='arc-config']"));
            user            = new KeyValuePair <string, IArcliteWebElement>("User Information", new ArcliteButton("User Information", "//li[@class='nav-item dropdown']/a"));

            this.setElementXpaths();
            this.elementXpaths.ToList().ForEach(x => page.pageElements.Add(x.Key, x.Value));
        }
Пример #5
0
        public SettingsXAWE(IArclitePage page)
        {
            elementXpaths = new Dictionary <string, IArcliteWebElement>();

            customFields      = new KeyValuePair <string, IArcliteWebElement>("Setting Custom Fields", new ArcliteButton("Setting Custom Fields", "//a[@data-settings='customfield']"));
            otherSettings     = new KeyValuePair <string, IArcliteWebElement>("Setting Other Settings", new ArcliteButton("Setting Other Settings", "//a[@data-settings='timeout']"));
            inventoryItemType = new KeyValuePair <string, IArcliteWebElement>("Setting Inventory Item Type", new ArcliteButton("Setting Inventory Item Type", "//a[@data-settings='itemtype']"));
            unit     = new KeyValuePair <string, IArcliteWebElement>("Setting Unit", new ArcliteButton("Setting Unit", "//a[@data-settings='unit']"));
            currency = new KeyValuePair <string, IArcliteWebElement>("Setting Currency", new ArcliteButton("Setting Currency", "//a[@data-settings='currency']"));

            locationManager      = new KeyValuePair <string, IArcliteWebElement>("Setting Location Manager", new ArcliteButton("Setting Location Manager", "//a[@data-settings='warehouse']"));
            stockAdjustment      = new KeyValuePair <string, IArcliteWebElement>("Setting Stock Adjustment", new ArcliteButton("Setting Stock Adjustment", "//a[@data-settings='stock']"));
            qualifications       = new KeyValuePair <string, IArcliteWebElement>("Setting Qualifications", new ArcliteButton("Setting Qualifications", "//a[@data-settings='qualification']"));
            qualificationsMatrix = new KeyValuePair <string, IArcliteWebElement>("Setting Qualifications Matrix", new ArcliteButton("Setting Qualifications Matrix", "//a[@data-settings='qualificationMatrix']"));
            assetType            = new KeyValuePair <string, IArcliteWebElement>("Setting Asset Type", new ArcliteButton("Setting Asset Type", "//a[@data-settings='assetType']"));

            this.setElementXpaths();
            this.elementXpaths.ToList().ForEach(x => page.pageElements.Add(x.Key, x.Value));
        }
Пример #6
0
        /*
         * Get to that page given
         */

        public static void navigateToWeb(IArclitePage page, IActionsVisitor visitor, bool isFinal, IArcliteInputs inputs)
        {
            IArclitePage defaultPage = new ArcliteWebPage(visitor, inputs);

            IArclitePage        configurationPage = new ConfigurationsPage(visitor, inputs);
            IArclitePage        settingPage       = new SettingsPage(visitor, inputs);
            List <IArclitePage> webPageList       = new List <IArclitePage>();

            webPageList.Add(defaultPage);
            webPageList.Add(configurationPage);
            webPageList.Add(settingPage);

            int count = 0;

            foreach (IArclitePage p in webPageList)
            {
                if (count > 0)
                {
                    Util.navigateToWeb(p, visitor, false, inputs);
                }
                if (count == 2)
                {
                    visitor.switchFrame();
                }
                if (p.pageElements.ContainsKey(page.pageTitle))
                {
                    p.pageElements[page.pageTitle].accept(visitor, new InputVal());
                    if (isFinal && count != 2)
                    {
                        visitor.switchFrame();
                    }
                    return;
                }
                count++;
            }
            throw new ArgumentException("page does not exist");
        }
 public SchedulerPageXAWE(IArclitePage page)
 {
 }
 public DashboardPageXAWE(IArclitePage page)
 {
     elementXpaths = new Dictionary <string, IArcliteWebElement>();
     search        = new KeyValuePair <string, IArcliteWebElement>("Search Dashboard", new ArcliteTextBox("Search Dashboard", "//input[@id='grid_DXSE_I']"));
     this.elementXpaths.ToList().ForEach(x => page.pageElements.Add(x.Key, x.Value));
 }