internal void FillJobOrderFormAndSave(Api.Browser xrmBrowser, String employerName, String info) { this.xrmBrowser = xrmBrowser; xrmBrowser.ThinkTime(1500); this.employerName = employerName; employerName = xrmBrowser.JobOrder.FillJobOrderFormAndSave(employerName, info, 2000); }
public void ClosePendingEmailReminder() { using (var xrmBrowser = new Microsoft.Dynamics365.UIAutomation.Api.Browser(TestSettings.Options)) { xrmBrowser.LoginPage.Login(_xrmUri, pscWasteUserName1, pscWastePassword1); try { xrmBrowser.GuidedHelp.CloseGuidedHelp(); } catch { } xrmBrowser.ThinkTime(2000); try { xrmBrowser.Dialogs.CloseWarningDialog(); } catch { } xrmBrowser.ThinkTime(2000); xrmBrowser.Navigation.OpenSubArea("LP", "Applications"); xrmBrowser.ThinkTime(2000); xrmBrowser.Grid.SwitchView("Active Applications"); xrmBrowser.ThinkTime(1000); xrmBrowser.Grid.OpenRecord(0); xrmBrowser.ThinkTime(1000); } }
public void OpenApplication() { using (var xrmBrowser = new Microsoft.Dynamics365.UIAutomation.Api.Browser(TestSettings.Options)) { xrmBrowser.LoginPage.Login(_xrmUri, pscWasteUserName1, pscWastePassword1); xrmBrowser.ThinkTime(500); try { xrmBrowser.GuidedHelp.CloseGuidedHelp(); } catch { } xrmBrowser.ThinkTime(2000); try { xrmBrowser.Dialogs.CloseWarningDialog(); } catch { } xrmBrowser.Navigation.OpenSubArea("LP", "Applications"); xrmBrowser.Grid.SwitchView("Active Applications"); xrmBrowser.Grid.Search("*WE"); xrmBrowser.Grid.OpenRecord(0); xrmBrowser.ThinkTime(10000); // do // { // xrmBrowser.ThinkTime(500); // var id = OpenQA.Selenium.By.Id("Application Type_label"); // statusText = xrmBrowser.Driver.FindElement(id).Text; // } while (statusText == "New Application"); // Assert.IsTrue(String.IsNullOrEmpty(statusText), statusText); } }
public void CreateANewJob() { using (var xrmBrowser = new Microsoft.Dynamics365.UIAutomation.Api.Browser(BrowserType.Chrome)) { xrmBrowser.LoginPage.Login(_xrmUri, _username, _password); xrmBrowser.GuidedHelp.CloseGuidedHelp(); xrmBrowser.ThinkTime(500); xrmBrowser.Navigation.OpenSubArea("Sales", "Jobs"); xrmBrowser.ThinkTime(3000); xrmBrowser.CommandBar.ClickCommand("New"); xrmBrowser.ThinkTime(2000); // test data source //var jobData = ExcelDataAccess.GetTestData("TestCreateNewJob"); xrmBrowser.Entity.SetValue("dsl_suburbid", "0110 - Avenues"); //jobData.Suburb); xrmBrowser.Driver.FindElement(By.Id("dsl_suburbid")).SendKeys(Keys.Tab); xrmBrowser.Entity.SetValue("dsl_servicelocationid_lookupValue", "Whangarei"); //jobData.ServiceLocation); xrmBrowser.Driver.FindElement(By.Id("dsl_servicelocationid_lookupValue")).SendKeys(Keys.Tab); xrmBrowser.Entity.SetValue("dsl_accountid", "5611"); //jobData.Account); xrmBrowser.Driver.FindElement(By.Id("dsl_accountid")).SendKeys(Keys.Tab); xrmBrowser.Entity.SetValue("dsl_registrationnumber", "HPZ495"); // jobData.Rego); xrmBrowser.Driver.FindElement(By.Id("dsl_registrationnumber")).SendKeys(Keys.Tab); xrmBrowser.ThinkTime(2000); // check if another iframe exisits int size = xrmBrowser.Driver.FindElements(By.TagName("iframe")).Count; if (size > 1) { // if another frame exisits, then need to close the dialog xrmBrowser.Driver.SwitchTo().DefaultContent(); xrmBrowser.ThinkTime(2000); if (xrmBrowser.Driver.IsVisible(By.Id("alertJs-divWarning"))) { xrmBrowser.Driver.ClickWhenAvailable(By.Id("alertJs-close")); // xrmBrowser.Driver.FindElement(By.XPath(Elements.Xpath[Reference.Login.StaySignedIn])).Submit(); } } xrmBrowser.ThinkTime(3000); xrmBrowser.CommandBar.ClickCommand("Save & Close"); xrmBrowser.ThinkTime(2000); } }
public void TestOpenCase() { using (var xrmBrowser = new Microsoft.Dynamics365.UIAutomation.Api.Browser(BrowserType.Chrome)) { 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); } }
public void ValidateCreatedJobOrder(Api.Browser xrmBrowser) { this.xrmBrowser = xrmBrowser; xrmBrowser.Navigation.NavigateToJobOrdersPage(1000); xrmBrowser.Navigation.ValidateTextFromGrid(employerName); }
//[TestMethod] public void NavigateToNewJobOrderPage(Api.Browser xrmBrowser) { this.xrmBrowser = xrmBrowser; xrmBrowser.Navigation.NavigateToJobOrdersPage(500); xrmBrowser.Navigation.NavigateToNewForm(1000); }