Ejemplo n.º 1
0
        public void TestUpdateCase()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);

                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.ThinkTime(500);
                xrmBrowser.PerformanceCenter.IsEnabled = true;
                xrmBrowser.Navigation.OpenSubArea(Reference.Localization.Sales, Reference.Localization.Accounts);

                xrmBrowser.ThinkTime(3000);
                xrmBrowser.Grid.OpenRecord(0);
                xrmBrowser.Navigation.OpenRelated(Reference.Localization.Cases);

                xrmBrowser.Related.SwitchView(Reference.Localization.ActiveCases);

                xrmBrowser.ThinkTime(2000);
                xrmBrowser.Related.OpenGridRow(0);
                xrmBrowser.ThinkTime(2000);

                xrmBrowser.Entity.SetValue(new OptionSet {
                    Name = "caseorigincode", Value = "Email"
                });
                xrmBrowser.Entity.Save();
                xrmBrowser.ThinkTime(5000);
            }
        }
Ejemplo n.º 2
0
        public void TestUpdateContact()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);
                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                var perf = xrmBrowser.PerformanceCenter;

                if (!perf.IsEnabled)
                {
                    perf.IsEnabled = true;
                }

                xrmBrowser.ThinkTime(500);
                xrmBrowser.Navigation.OpenSubArea(Reference.Localization.Sales, Reference.Localization.Contacts);

                xrmBrowser.ThinkTime(2000);
                xrmBrowser.Grid.SwitchView(Reference.Localization.ActiveContacts);

                xrmBrowser.ThinkTime(1000);
                xrmBrowser.Grid.OpenRecord(0);

                xrmBrowser.Entity.SetValue("emailaddress1", "*****@*****.**");
                xrmBrowser.Entity.SetValue("mobilephone", "123-222-4444");
                xrmBrowser.Entity.SetValue("birthdate", DateTime.Parse("12/2/1984"));

                xrmBrowser.Entity.Save();
                xrmBrowser.ThinkTime(5000);
            }
        }
Ejemplo n.º 3
0
        public void TestTakeScreenshot()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);
                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                ScreenshotImageFormat fileFormat = ScreenshotImageFormat.Tiff;  // Image Format -> Png, Jpeg, Gif, Bmp and Tiff.

                xrmBrowser.TakeWindowScreenShot("D:\\Screenshot" + "." + fileFormat, fileFormat);

                xrmBrowser.ThinkTime(500);
                xrmBrowser.Navigation.OpenSubArea("Sales", "Accounts");

                xrmBrowser.ThinkTime(2000);
                xrmBrowser.Grid.SwitchView("Active Accounts");

                xrmBrowser.ThinkTime(1000);
                xrmBrowser.CommandBar.ClickCommand("New");

                xrmBrowser.ThinkTime(4000);
                xrmBrowser.Entity.SetValue("name", "Test API Account");
                xrmBrowser.Entity.SetValue("telephone1", "555-555-5555");
                xrmBrowser.Entity.SetValue("websiteurl", "https://easyrepro.crm.dynamics.com");

                xrmBrowser.CommandBar.ClickCommand("Save & Close");
                xrmBrowser.ThinkTime(2000);
            }
        }
Ejemplo n.º 4
0
        public void TestCreateNewCase()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);

                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.ThinkTime(500);
                xrmBrowser.Navigation.OpenSubArea("Sales", "Accounts");

                xrmBrowser.ThinkTime(3000);
                xrmBrowser.Grid.OpenRecord(0);
                xrmBrowser.Navigation.OpenRelated("Cases");

                xrmBrowser.Related.SwitchView("Active Cases");
                xrmBrowser.ThinkTime(2000);
                xrmBrowser.Related.OpenGridRow(0);
                xrmBrowser.ThinkTime(2000);
                xrmBrowser.CommandBar.ClickCommand("New");
                xrmBrowser.ThinkTime(2000);


                xrmBrowser.Entity.SetValue("title", "Test API Case");
                xrmBrowser.Entity.SelectLookup("customerid", 0);

                xrmBrowser.CommandBar.ClickCommand("Save & Close");
                xrmBrowser.ThinkTime(10000);
            }
        }
Ejemplo n.º 5
0
        public void TestsCrmAsyncRequestResponseSample()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);

                // Navigate to the app by selecting the AsyncRequestResponseSample app in the app list
                var id = "TabArrowDivider";
                xrmBrowser.Driver.ClickWhenAvailable(By.Id(id));

                xrmBrowser.ThinkTime(5000);  // not sure why I need think time here, but I get an exception otherwise.
                // Need to see if there is a better way to consistently select the app from the list by app name.  For now using XPath...
                var xpath      = "//*[@id='taskpane-scroll-container']/div[3]/button[1]";
                var appElement = xrmBrowser.Driver.FindElement(By.XPath(xpath));  // Tried ClicWhenAvailable, but it failed sporadically
                appElement.Click();

                // Create a new record and save
                xrmBrowser.ThinkTime(5000);  // not sure why I need think time here, but I get an exception otherwise.
                xrmBrowser.CommandBar.ClickCommand("New");
                var guid = Guid.NewGuid().ToString();
                xrmBrowser.Entity.SetValue("dkdt_name", guid);
                xrmBrowser.CommandBar.ClickCommand("Save");

                // Verify web resource contents after message comes back from Azure
                xrmBrowser.Document.SwitchToContentFrame();
                xrmBrowser.Driver.SwitchTo().Frame("WebResource_CheckForUpdateFromAzureCode");
                var wait = new WebDriverWait(xrmBrowser.Driver, TimeSpan.FromSeconds(35));
                wait.Until(d => d.FindElement(By.Id("status")).Text.Contains("Azure code updated entity."));
            }
        }
Ejemplo n.º 6
0
        public void TestCreateWorkflow()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);

                xrmBrowser.Navigation.OpenSubArea("Settings", "Processes");

                xrmBrowser.Processes.CreateProcess("Test Process", XrmProcessesPage.ProcessType.Workflow, "Account");

                xrmBrowser.Driver.LastWindow().Close();

                xrmBrowser.Driver.LastWindow();

                var rows = xrmBrowser.Grid.GetGridItems().Value;

                xrmBrowser.Grid.SelectRecord(rows.Count - 1);   //Select the newly created record
                xrmBrowser.Processes.Activate();

                xrmBrowser.Grid.SelectRecord(rows.Count - 1);
                xrmBrowser.Processes.Deactivate();

                xrmBrowser.Grid.SelectRecord(rows.Count - 1);
                xrmBrowser.Processes.Delete();
            }
        }
Ejemplo n.º 7
0
        public void TestValidateVersion()
        {
            var validAppVersion = "8.2.1.360";
            var validDBVersion  = "8.2.1.360";

            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);
                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.ThinkTime(500);

                xrmBrowser.Navigation.OpenAbout();

                xrmBrowser.Driver.LastWindow().SwitchTo().ActiveElement();

                var dbVersion  = xrmBrowser.Document.getElementByXPath("id(\"PageBody\")/table/tbody/tr[1]/td[2]/div/bdo[3]").Text;
                var appVersion = xrmBrowser.Document.getElementByXPath("id(\"PageBody\")/table/tbody/tr[1]/td[2]/div/bdo[2]").Text.Replace("(", "").Replace(")", "");


                if (dbVersion != validDBVersion)
                {
                    throw new Exception($"The database verion ({dbVersion}) is not valid for this org. The version should be {validDBVersion}");
                }
                if (appVersion != validAppVersion)
                {
                    throw new Exception($"The application verion ({appVersion}) is not valid for this org. The version should be {validAppVersion}");
                }
            }
        }
Ejemplo n.º 8
0
        public void TestDelegateCommand()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                var command = new DelegateBrowserCommand <string>(
                    new BrowserCommandOptions(Constants.DefaultTraceSource,
                                              string.Empty,
                                              Constants.DefaultRetryAttempts,
                                              Constants.DefaultRetryDelay,
                                              null,
                                              true,
                                              typeof(InvalidOperationException)),
                    d =>
                {
                    throw new InvalidOperationException("test");
                });

                var result = command.Execute(xrmBrowser.Driver);

                Assert.IsNotNull(result.Success);
                Assert.IsFalse(result.Success.Value);
                Assert.AreEqual(Constants.DefaultRetryAttempts, result.ExecutionAttempts);
                Assert.IsTrue(result.ExecutionTime > TimeSpan.FromMilliseconds(Constants.DefaultRetryDelay * Constants.DefaultRetryAttempts).Milliseconds);
                Assert.AreEqual(String.Empty, result.Value);
            }
        }
Ejemplo n.º 9
0
        public void TestCreateWorkflow()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);
                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.Navigation.OpenSubArea(Reference.Localization.Settings, Reference.Localization.Processes);

#if CRM_ONPREM
                xrmBrowser.Processes.CreateProcess("Test Process", Reference.Localization.Workflow, Reference.Localization.Account);
#endif
#if CRM_365
                xrmBrowser.Processes.CreateProcess("Test Process", XrmProcessesPage.ProcessType.Workflow, Reference.Localization.Account);
#endif
                xrmBrowser.Driver.LastWindow().Close();

                xrmBrowser.Driver.LastWindow();

                var rows = xrmBrowser.Grid.GetGridItems().Value;
                xrmBrowser.Grid.Sort(Reference.Localization.CreatedOn);

                xrmBrowser.Grid.SelectRecord(rows.Count - 1);   //Select the newly created record
                xrmBrowser.Processes.Activate();

                xrmBrowser.Grid.SelectRecord(rows.Count - 1);
                xrmBrowser.Processes.Deactivate();

                xrmBrowser.Grid.SelectRecord(rows.Count - 1);
                xrmBrowser.Processes.Delete();
            }
        }
Ejemplo n.º 10
0
        public void TestClickSubGridInLead()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);

                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.Navigation.OpenSubArea("Sales", "Leads");

                xrmBrowser.Grid.SwitchView("All Leads");

                xrmBrowser.Grid.OpenRecord(0);


                xrmBrowser.Entity.ClickSubgridAddButton("Stakeholders");
                xrmBrowser.Entity.SelectSubgridLookup("Stakeholders", "Alex Wu");
                xrmBrowser.Entity.ClickSubgridAddButton("Stakeholders");
                xrmBrowser.Entity.SelectSubgridLookup("Stakeholders", 3);
                xrmBrowser.Entity.ClickSubgridAddButton("Stakeholders");
                xrmBrowser.Entity.SelectSubgridLookup("Stakeholders", true);
                xrmBrowser.Lookup.SelectItem(0);
                xrmBrowser.Lookup.Select();
                xrmBrowser.Lookup.SelectItem("Alex Wu");
                xrmBrowser.Lookup.Select();
                xrmBrowser.Lookup.Add();
            }
        }
Ejemplo n.º 11
0
 public void TestADFSLogin()
 {
     using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
     {
         xrmBrowser.LoginPage.Login(_xrmUri, _username, _password, ADFSLoginAction);
     }
 }
Ejemplo n.º 12
0
        public void TestInvalidRelatedClickCommand()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);

                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.ThinkTime(500);
                xrmBrowser.Navigation.OpenSubArea("Sales", "Accounts");

                xrmBrowser.ThinkTime(3000);
                xrmBrowser.Grid.OpenRecord(0);
                xrmBrowser.Navigation.OpenRelated("Cases");
                xrmBrowser.Related.Sort("createdo1n");

                xrmBrowser.Related.SwitchView("Active Cases");

                xrmBrowser.Related.Search("F");

                xrmBrowser.Related.ClickCommand("ADD");
                xrmBrowser.QuickCreate.Cancel();
                xrmBrowser.ThinkTime(2000);
            }
        }
Ejemplo n.º 13
0
 public void Test()
 {
     using (var chrome = new XrmBrowser(TestSettings.Options))
     {
         chrome.LoginPage.Login(_xrmUri, _username, _password);
     }
 }
Ejemplo n.º 14
0
        public void TestGetValueFromCompositeControl()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);
                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.Navigation.OpenSubArea("Sales", "Leads");

                xrmBrowser.Grid.SwitchView("All Leads");

                xrmBrowser.Grid.OpenRecord(0);

                List <Field> fields = new List <Field>
                {
                    new Field()
                    {
                        Id = "firstname"
                    },
                    new Field()
                    {
                        Id = "lastname"
                    }
                };
                string fullName = xrmBrowser.Entity.GetValue(new CompositeControl()
                {
                    Id = "fullname", Fields = fields
                });
            }
        }
Ejemplo n.º 15
0
        public void TestCreateNewLead()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);
                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.Navigation.OpenSubArea(Reference.Localization.Sales, Reference.Localization.Leads);
                xrmBrowser.CommandBar.ClickCommand(Reference.Localization.New);

                xrmBrowser.ThinkTime(2000);
                List <Field> fields = new List <Field>
                {
                    new Field {
                        Id = "firstname", Value = "Test"
                    },
                    new Field {
                        Id = "lastname", Value = "Lead"
                    }
                };
                xrmBrowser.Entity.SetValue("subject", "Test API Lead");
                xrmBrowser.Entity.SetValue(new CompositeControl {
                    Id = "fullname", Fields = fields
                });
                xrmBrowser.Entity.SetValue("mobilephone", "555-555-5555");
                xrmBrowser.Entity.SetValue("description", "Test lead creation with API commands");

                xrmBrowser.CommandBar.ClickCommand(Reference.Localization.Save);
                xrmBrowser.ThinkTime(5000);
            }
        }
Ejemplo n.º 16
0
        public void TestCreateNewCase()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);

                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.ThinkTime(500);
                xrmBrowser.Navigation.OpenSubArea("Sales", "Accounts");

                xrmBrowser.ThinkTime(3000);
                xrmBrowser.Grid.OpenRecord(0);
                xrmBrowser.Navigation.OpenRelated("Cases");

                xrmBrowser.Related.SwitchView("Active Cases");
                xrmBrowser.ThinkTime(2000);

                xrmBrowser.Related.ClickCommand("ADD NEW CASE");
                xrmBrowser.ThinkTime(2000);


                xrmBrowser.QuickCreate.SetValue("title", "Test API Case");

                xrmBrowser.QuickCreate.Save();
                xrmBrowser.ThinkTime(10000);
            }
        }
Ejemplo n.º 17
0
        public void TestCreateNewAccount()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);
                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.ThinkTime(500);
                xrmBrowser.Navigation.OpenSubArea("Sales", "Accounts");

                xrmBrowser.ThinkTime(2000);
                xrmBrowser.Grid.SwitchView("Active Accounts");

                xrmBrowser.ThinkTime(1000);
                xrmBrowser.CommandBar.ClickCommand("New");

                xrmBrowser.ThinkTime(4000);
                xrmBrowser.Entity.SetValue("name", "Test API Account");
                xrmBrowser.Entity.SetValue("telephone1", "555-555-5555");
                xrmBrowser.Entity.SetValue("websiteurl", "https://easyrepro.crm.dynamics.com");

                xrmBrowser.CommandBar.ClickCommand("Save & Close");
                xrmBrowser.ThinkTime(2000);
            }
        }
Ejemplo n.º 18
0
        public void TestUpdateCase()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);

                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.ThinkTime(500);
                xrmBrowser.Navigation.OpenSubArea("Sales", "Accounts");

                xrmBrowser.ThinkTime(3000);
                xrmBrowser.Grid.OpenRecord(0);
                xrmBrowser.Navigation.OpenRelated("Cases");

                xrmBrowser.Related.SwitchView("Active Cases");

                xrmBrowser.ThinkTime(2000);
                xrmBrowser.Related.OpenGridRow(0);
                xrmBrowser.ThinkTime(2000);

                xrmBrowser.Entity.SetValue(new OptionSet {
                    Name = "caseorigincode", Value = "Email"
                });
                xrmBrowser.Entity.Save();
                xrmBrowser.ThinkTime(10000);
            }
        }
Ejemplo n.º 19
0
        public void TestCreateNewOpportunity()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);
                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.ThinkTime(500);
                xrmBrowser.Navigation.OpenSubArea("Sales", "Opportunities");

                xrmBrowser.ThinkTime(200);
                xrmBrowser.Grid.SwitchView("Open Opportunities");

                xrmBrowser.ThinkTime(1000);
                xrmBrowser.CommandBar.ClickCommand("New");

                xrmBrowser.ThinkTime(5000);

                xrmBrowser.Entity.SetValue("name", "Test API Opportunity");
                xrmBrowser.Entity.SetValue("description", "Testing the create api for Opportunity");

                xrmBrowser.CommandBar.ClickCommand("Save");
                xrmBrowser.ThinkTime(2000);
            }
        }
Ejemplo n.º 20
0
        public void TestSetValue()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);
                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.Navigation.OpenSubArea("Sales", "Leads");

                xrmBrowser.Grid.SwitchView("All Leads");

                xrmBrowser.Grid.OpenRecord(0);

                List <Field> fields = new List <Field>
                {
                    new Field()
                    {
                        Id = "firstname", Value = "Test"
                    },
                    new Field()
                    {
                        Id = "lastname", Value = "Lead"
                    }
                };
                xrmBrowser.Entity.SetValue("subject", "Test API Lead");
                xrmBrowser.Entity.SetValue(new CompositeControl()
                {
                    Id = "fullname", Fields = fields
                });
                xrmBrowser.Entity.SetValue("emailaddress1", "*****@*****.**");
                xrmBrowser.Entity.SetValue("mobilephone", "555-555-5555");
                xrmBrowser.Entity.SetValue("description", "Test lead creation with API commands");
            }
        }
Ejemplo n.º 21
0
        public void TestCreateUser()
        {
            string firstName   = "Test";
            string lastName    = "User";
            string displayName = "Test User";
            string userName    = "******";

            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);

                xrmBrowser.Navigation.OpenSubArea("Settings", "Security");

                xrmBrowser.Administration.OpenFeature("Users");

                xrmBrowser.CommandBar.ClickCommand("NEW");

                xrmBrowser.Dialogs.AddUser();

                xrmBrowser.Office365.CreateUser(firstName, lastName, displayName, userName);

                xrmBrowser.Grid.Search(displayName);

                var results = xrmBrowser.Grid.GetGridItems();

                if (results.Value.Count == 0)
                {
                    throw new InvalidOperationException("User not found or was not created.");
                }
            }
        }
Ejemplo n.º 22
0
 public static void Login(Uri uri, SecureString username, SecureString password, string testCase)
 {
     xrmBrowser = new XrmBrowser(TestSettings.Options);
     Logs.LogHTML(string.Empty, Logs.HTMLSection.TestCase, Logs.TestStatus.NA, testCase);
     xrmBrowser.LoginPage.Login(uri, username, password);
     xrmBrowser.GuidedHelp.CloseGuidedHelp();
     Logs.LogHTML("Logged in Successfully", Logs.HTMLSection.Details, Logs.TestStatus.Pass);
 }
Ejemplo n.º 23
0
        public void TestOpenMobile()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);

                xrmBrowser.Mobile.Open();
            }
        }
Ejemplo n.º 24
0
        public void RunSmokeTest()
        {
            using (var xrmBrowser = new XrmBrowser(_options))
            {
                try
                {
                    xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);
                    xrmBrowser.GuidedHelp.CloseGuidedHelp();

                    xrmBrowser.ThinkTime(500);
                    xrmBrowser.Navigation.OpenSubArea("Sales", "Contacts");

                    xrmBrowser.ThinkTime(2000);
                    xrmBrowser.Grid.SwitchView("Active Contacts");

                    xrmBrowser.ThinkTime(1000);
                    xrmBrowser.CommandBar.ClickCommand("New");

                    xrmBrowser.ThinkTime(5000);

                    string firstname = "Wael";
                    string lastname  = "Test";
                    string tel       = new Random().Next(200000000, 300000000).ToString();

                    var fields = new List <Field>
                    {
                        new Field()
                        {
                            Id = "firstname", Value = firstname
                        },
                        new Field()
                        {
                            Id = "lastname", Value = lastname
                        }
                    };
                    xrmBrowser.Entity.SetValue(new CompositeControl()
                    {
                        Id = "fullname", Fields = fields
                    });
                    xrmBrowser.Entity.SetValue("emailaddress1", "*****@*****.**");
                    xrmBrowser.Entity.SetValue("mobilephone", tel);
                    xrmBrowser.Entity.SetValue("birthdate", DateTime.Parse("11/1/1980"));
                    xrmBrowser.Entity.SetValue(new OptionSet {
                        Name = "preferredcontactmethodcode", Value = "Email"
                    });

                    xrmBrowser.CommandBar.ClickCommand("Save");
                    xrmBrowser.ThinkTime(5000);
                }
                finally
                {
                    string screenShot = string.Format("{0}\\SmokeTest_Final.jpeg", TestContext.TestResultsDirectory);
                    xrmBrowser.TakeWindowScreenShot(screenShot, ScreenshotImageFormat.Jpeg);
                    TestContext.AddResultFile(screenShot);
                }
            }
        }
Ejemplo n.º 25
0
        public void TestSignOutofCrm()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);
                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.Navigation.SignOut();
            }
        }
Ejemplo n.º 26
0
        public void TestOpenPortal()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);
                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.Navigation.OpenAdminPortal();
            }
        }
Ejemplo n.º 27
0
        public void TestGlobalSearch()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);
                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.Navigation.GlobalSearch("Contoso");
            }
        }
Ejemplo n.º 28
0
 public void TestLogin()
 {
     // Instantiate a browser session from the BrowserOptions for this test.
     using (var xrmBrowser = new XrmBrowser(options))
     {
         // Login with the retrieved user's account for CRM.
         xrmBrowser.LoginPage.Login(xrmUri, username, password);
         // Display the page for 5 seconds just for demonstration purposes.
         xrmBrowser.ThinkTime(5000);
     }
 }
Ejemplo n.º 29
0
        public void TestSearch()
        {
            using (var xrmBrowser = new XrmBrowser(options))
            {
                xrmBrowser.LoginPage.Login(xrmUri, username, password);

                xrmBrowser.Navigation.GlobalSearch("Automated Test Organization");

                xrmBrowser.ThinkTime(5000);
            }
        }
Ejemplo n.º 30
0
        public void TestSwitchView()
        {
            using (var xrmBrowser = new XrmBrowser(TestSettings.Options))
            {
                xrmBrowser.LoginPage.Login(_xrmUri, _username, _password);
                xrmBrowser.GuidedHelp.CloseGuidedHelp();

                xrmBrowser.Navigation.OpenSubArea("Sales", "Accounts");
                xrmBrowser.Grid.SwitchView("Active Accounts");
            }
        }