public override void Execute() { PxLogin.LogIn("admin", "123"); var batch = new Batch(); batch.OpenScreen(); batch.Insert(); batch.Summary.Module.Select("GL"); batch.Summary.DateEntered.Type(new DateTime(2014, 10, 27)); batch.Summary.BranchID.Select("MAIN"); batch.Summary.LedgerID.Select("ACTUAL"); batch.Summary.CuryID.Select("USD"); batch.Summary.AutoReverse.SetFalse(); batch.Summary.AutoReverseCopy.SetFalse(); batch.Summary.Description.Type("My 1-st Test Batch"); batch.Details.New(); batch.Details.Row.AccountID.Select("100000"); batch.Details.Row.SubID.TypeKeys("US000000000"); batch.Details.Row.ProjectID.Select("ATTRUSE001"); batch.Details.Row.TaskID.Select("1"); batch.Details.Row.RefNbr.Type("1"); batch.Details.Row.CuryDebitAmt.Type(100); batch.Details.Row.CuryCreditAmt.Type(0); batch.Details.New(); batch.Details.Row.AccountID.Select("101000"); batch.Save(); batch.Release(); }
public override void Execute() { PxLogin.LogIn("admin", "admin"); var toolsForm = new ToolManagement(); toolsForm.OpenScreen(); toolsForm.Insert(); toolsForm.Summary.ToolCD.Type("ABC"); toolsForm.Summary.Description.Type("My new tool"); toolsForm.Summary.SerialNumber.Type("XYZ"); //System should complain that serial number doesn't start with BOB-. try { toolsForm.Save(); Log.Error("Tool should not have saved, serial number is invalid"); } catch (Exception e) { Log.Information(e.Message); } toolsForm.Summary.SerialNumber.Type("BOB-1234"); toolsForm.Save(); Log.Information("Test completed!"); }
//This method executes before the test. public override void BeforeExecute() { using (TestExecution.CreateTestCaseGroup("Preparation")) { using (TestExecution.CreateTestStepGroup("Sign in")) { Console.WriteLine("\n************************"); Console.WriteLine("\nWelcome, you are executing Test: '" + this.ToString() + "' for site " + Config.SITE_DST_URL); Console.WriteLine("\n Time: " + startTime.ToString()); Console.WriteLine("\n************************"); Browser.StartingUrl = Config.SITE_DST_URL; PxLogin LoginPage = new PxLogin(); String login = Config.SITE_DST_LOGIN; String company = ""; int location = login.IndexOf("@"); if (location > 0) { company = login.Substring(location + 1); login = login.Substring(0, location); } LoginPage.Username.Type(login); LoginPage.Password.Type(Config.SITE_DST_PASSWORD); if (company != "") { LoginPage.CompanyId.SelectValue(company); } LoginPage.SignIn.Click(); Console.WriteLine("You have successfully logged into Acumatica."); } } }
//Add your test-specific logic in the method below for every test. public override void Execute() { PxLogin.LogIn("admin", "123"); //Test case 1 JournalEntry journalEntry = new JournalEntry(); journalEntry.OpenScreen(); //Test case 2 journalEntry.Insert(); journalEntry.Summary.BranchID.Select("HQ"); journalEntry.Summary.LedgerID.Select("ACTUAL"); journalEntry.Summary.Description.Type("Test journal entry 1"); journalEntry.Details.New(); journalEntry.Details.Row.AccountID.Select("10700"); journalEntry.Details.Row.AccountID.GetError().VerifyContains("Denominated GL Account currency is different from transaction currency."); journalEntry.Details.Row.AccountID.Type("10100"); journalEntry.Details.Row.AccountID_Account_description.GetValue().VerifyEquals("Wrong Description"); journalEntry.Details.Row.AccountID_Account_description.GetValue().VerifyEquals("Petty Cash"); journalEntry.Details.Row.ProjectID.Select("X"); journalEntry.Details.Row.CuryDebitAmt.Type(100); journalEntry.Details.New(); journalEntry.Details.Row.AccountID.Select("62400"); journalEntry.Details.Row.CuryCreditAmt.Type(0); journalEntry.Details.SelectRow(2); journalEntry.Details.Row.CuryCreditAmt.Type(100); journalEntry.Save(); //Test case 3 journalEntry.Release(); journalEntry.Summary.AutoReverseCopy.GetValue().VerifyEquals(false); //Test case 4 journalEntry.ReverseBatch(); journalEntry.Summary.AutoReverseCopy.GetValue().VerifyEquals(true); journalEntry.Summary.Description.Type("Test journal entry 2"); journalEntry.Save(); //Test case 5 ReleaseTransactionsGl releaseTransactionsGl = new ReleaseTransactionsGl(); releaseTransactionsGl.OpenScreen(); releaseTransactionsGl.Details.Row.Selected.SetTrue(); releaseTransactionsGl.Process(); }
public override void Execute() { PxLogin.LogIn("admin", "123"); var toolsForm = new ToolManagement(); toolsForm.OpenScreen(); toolsForm.Insert(); toolsForm.Summary.Toolcd.Type("ABC"); toolsForm.Summary.Description.Type("My new tool"); toolsForm.Summary.SerialNumber.Type("XYZ"); //System should complain that serial number doesn't start with BOB-. toolsForm.Save(); toolsForm.Summary.SerialNumber.Type("BOB-1234"); toolsForm.Save(); }
public virtual void ResetSite(InputVars myVars) { Console.WriteLine("- UnPublish Customizations"); using (TestExecution.CreateTestCaseGroup("UnPublish Customizations")) { string dir = Directory.GetCurrentDirectory(); CustomizationMgr myMgr = new CustomizationMgr(); myMgr.OpenScreen(); myMgr.ActionUndoPublish(); } using (TestExecution.CreateTestCaseGroup("Restore fresh database")) { Console.WriteLine("- Restore SQL DB"); DatabaseOperations db = new DatabaseOperations(); db.RestoreDB(myVars.sQLServerName, myVars.databaseName, myVars.backupLocation); } using (TestExecution.CreateTestStepGroup("Sign in")) { Console.WriteLine("Logging into " + Config.SITE_DST_URL); Browser.StartingUrl = Config.SITE_DST_URL; PxLogin LoginPage = new PxLogin(); String login = Config.SITE_DST_LOGIN; String company = ""; int location = login.IndexOf("@"); if (location > 0) { company = login.Substring(location + 1); login = login.Substring(0, location); } LoginPage.Username.Type(login); LoginPage.Password.Type(Config.SITE_DST_PASSWORD); if (company != "") { LoginPage.CompanyId.SelectValue(company); } LoginPage.SignIn.Click(); Console.WriteLine("You have successfully logged into Acumatica."); } }