public void ElementsTest_Textbox_Text() { HeaderMenu.Select(HeaderMenuValues.CAREERS); // CareerPage.CheckOpened(); Assert.IsTrue(CareerPage.CopyRight.Text.Contains("2016 EPAM"), "Invalid Data in copyright string on the footer"); }
public void ElementsTest_Link_Click() { HeaderMenu.Select(HeaderMenuValues.CAREERS); CareerPage.HeaderMenuCrumbs.Click(); Assert.IsTrue(HomePage.Title.Equals("EPAM | Software Product Development Services"), "Title after click on breadcrumb is incorrect, expected for HomePage"); }
public static void Show() { int selection = 0; bool invalidSelection = false; do { HeaderMenu.Show(); Console.WriteLine("You are at: > Games"); Console.WriteLine(""); Console.WriteLine("GAMES"); if (invalidSelection) { Console.WriteLine(""); Console.WriteLine("!INVALID SELECTION!"); Console.WriteLine(""); } Console.WriteLine(""); Console.WriteLine("1) List all games"); Console.WriteLine("2) Add new game"); Console.WriteLine("3) Update existing game"); Console.WriteLine("4) Delete game"); Console.WriteLine("0) Return to main menu"); Console.WriteLine(""); Console.Write("Please, input your selection: "); selection = Convert.ToInt32(Console.ReadLine()); invalidSelection = false; switch (selection) { case 1: ListGames(); break; case 2: AddGame(); break; case 3: UpdateGame(); break; case 4: DeleteGame(); break; case 0: //MainMenu.Show(); break; default: invalidSelection = true; break; } }while (selection != 0); }
public static void AddBook() { HeaderMenu.Show(); Console.WriteLine("You are at: > Books > Add new book."); Console.WriteLine(""); Book book = new Book(); Console.WriteLine("Type the title of the book you want to add."); book.Title = Console.ReadLine(); Console.WriteLine("Type the price of the book you want to add."); book.Price = Convert.ToDecimal(Console.ReadLine()); BooksRepository.Insert(book); Console.WriteLine(""); Console.WriteLine("Book inserted successfully!"); Console.WriteLine(""); Console.WriteLine("Press any key to return."); Console.ReadKey(); }
public static void ListGames() { HeaderMenu.Show(); Console.WriteLine("You are at: > Games > List all games"); Console.WriteLine(""); Console.WriteLine($"╔{new string('═', 109)}╗"); Console.WriteLine($"║ GAMES LIST{new string(' ', 98)}║"); Console.WriteLine($"╠═{new string('═', 3)}═╦═{new string('═', 20)}═╦═{new string('═', 40)}═╦═{new string('═', 10)}═╦═{new string('═', 10)}═╦═{new string('═', 9)}═╣"); Console.WriteLine($"║ {"ID",-3} ║ {"Category",-20} ║ {"Title",-40} ║ {"Console",-10} ║ {"Stock qty.",-10} ║ {"Price",-9} ║"); Console.WriteLine($"╠═{new string('═', 3)}═╬═{new string('═', 20)}═╬═{new string('═', 40)}═╬═{new string('═', 10)}═╬═{new string('═', 10)}═╬═{new string('═', 9)}═╣"); foreach (var game in GamesRepository.List()) { Console.WriteLine($"║ {game.ID,3} ║ {game.Category,-20} ║ {game.Title,-40} ║ {game.Console,-10} ║ {game.StockQuantity,10} ║ {game.Price,9:N2} ║"); } Console.WriteLine($"╚═{new string('═', 3)}═╩═{new string('═', 20)}═╩═{new string('═', 40)}═╩═{new string('═', 10)}═╩═{new string('═', 10)}═╩═{new string('═', 9)}═╝"); Console.WriteLine(""); Console.WriteLine("Press any key to return to games main menu..."); Console.ReadKey(); //Show(); }
public static void AddGame() { HeaderMenu.Show(); Console.WriteLine("You are at: > Games > New game"); Console.WriteLine(""); Game game = new Game(); Console.WriteLine("Input product title: "); game.Title = Console.ReadLine(); Console.Write("Input product price: "); game.Price = Convert.ToDecimal(Console.ReadLine()); GamesRepository.Insert(game); Console.WriteLine(""); Console.WriteLine("Product inserted successfully!"); Console.WriteLine(""); Console.WriteLine("Press any key to return to games main menu..."); Console.ReadKey(); //Show(); }
public static void DeleteMagazine() { HeaderMenu.Show(); Console.WriteLine("You are at: > Magazines > Delete magazines."); Console.WriteLine(""); Console.Write("Type the ID of the magazine you want to delete:"); int id = Convert.ToInt32(Console.ReadLine()); Magazine magazine = MagazinesRepository.Find(id); if (magazine != null) { Console.WriteLine($"You have selected: {magazine.Title}"); Console.WriteLine(""); MagazinesRepository.Delete(magazine); Console.WriteLine(""); Console.WriteLine("Magazine deleted successfully!"); Console.WriteLine(""); Console.WriteLine("Press any key to return."); Console.ReadKey(); } else { Console.WriteLine("Error. Invalid ID."); Console.WriteLine("Press any key to return."); Console.ReadKey(); return; } }
public void ElementsTest_Link_GetTooltip() { HeaderMenu.Select(HeaderMenuValues.CAREERS); CareerPage.JobSearchButton.Click(); CareerPage.SearchResultHeader.WaitDisplayed(); CareerPage.BestMatchIcon.WaitDisplayed(); Assert.IsTrue(CareerPage.BestMatchIcon.GetTooltip().Equals("Best Match"), "no tooltip 'Best Match'"); }
public void ElementsTest_Link_Displayed() { HeaderMenu.Select(HeaderMenuValues.CAREERS); CareerPage.JobSearchButton.WaitDisplayed(); CareerPage.JobSearchButton.Click(); CareerPage.BestMatchIcon.WaitDisplayed(); Assert.IsTrue(CareerPage.BestMatchIcon.Displayed, "icon 'Best Match' not displayed"); }
public void ContactFormTest() { HeaderMenu.Select(CONTACT); ContactPage.ContactUsButton.Click(); RequestInformationPage.CheckOpened(); RequestInformationPage.MessageArea.SendKeys("Hello, world!"); RequestInformationPage.MessageArea.AddNewLine("Everything is awesome!"); }
static void Main(string[] args) { HeaderMenu.Show(); Console.WriteLine("Seja bem vindo!"); MainMenu.Show(); }
public void ElementsTest_Button_Click() { HeaderMenu.Select(HeaderMenuValues.CAREERS); CareerPage.JobSearchButton.Highlight(); CareerPage.JobSearchButton.WaitDisplayed(); CareerPage.JobSearchButton.Click(); CareerPage.SearchResultHeader.WaitDisplayed(); Assert.IsTrue(CareerPage.SearchResultHeader.Displayed, "Search results not displayed - click action on button not performed"); }
public void ElementsTest_TextFiled_NewInput() { HeaderMenu.Select(HeaderMenuValues.CAREERS); CareerPage.JobSearchInput.WaitDisplayed(); CareerPage.JobSearchInput.Highlight(); CareerPage.JobSearchInput.NewInput("qa"); CareerPage.AutocompleteSuggestList.WaitDisplayed(); Assert.IsTrue(CareerPage.AutocompleteSuggestList.Displayed, "suggestlist not displayed"); }
public void ElementsTest_Link_GetReference() { HeaderMenu.Select(HeaderMenuValues.CAREERS); CareerPage.JobSearchButton.Click(); Assert.IsTrue(CareerPage.HeaderMenuCrumbs2.WaitReferenceContains("/careers").Contains("/careers"), "failed test Link.WaitReferenceContains()"); Assert.IsTrue(CareerPage.HeaderMenuCrumbs2.WaitMatchReference("https://www.epam.com/careers").Equals("https://www.epam.com/careers"), "failed test Link.WaitReferenceContains()"); Assert.IsTrue(CareerPage.HeaderMenuCrumbs2.Displayed, "breadcrumb 2 level"); Assert.IsTrue(CareerPage.HeaderMenuCrumbs2.GetReference().Equals("https://www.epam.com/careers"), "incorrect href value for bredcrumb link of second level"); }
public void NoCareerTest() { HeaderMenu.Select(CAREERS); CareerPage.CheckOpened(); CareerPage.JobFilter.Keywords.NewInput("C#"); CareerPage.AutocompleteSuggestList.ClickCenter(); CareerPage.JobFilter.Category.Select("HR & Talent Acquisition"); CareerPage.JobSearchButton.Click(); JobListingPage.CheckOpened(); JobListingPage.JobsList.WaitText("Sorry, your search returned no results. Please try another query."); }
public void CareerTest() { var attendee = new Attendee(); HeaderMenu.Select(CAREERS); CareerPage.CheckOpened(); CareerPage.JobFilter.Search(attendee.Filter); JobListingPage.CheckOpened(); //new Check("Table is not empty").isFalse(jobListingPage.jobsList::isEmpty); JobListingPage.GetJobRowByName("Senior QA Automation Engineer"); JobDescriptionPage.AddCvForm.Submit(attendee); //new Check("Captcha").Contains(()->jobDescriptionPage.captcha.getAttribute("class"), "form-field-error"); }
public void AboutTest() { HeaderMenu.Select(ABOUT); AboutPage.CheckOpened(); AboutPage.AboutText.WaitText("We collaborate with you to solve your biggest business challenges"); AboutPage.AboutCategoriesSection.Company.Highlight(); Assert.IsTrue(AboutPage.AboutCategoriesSection.Company.GetSource().Contains("/content/dam/epam/company/"), "The source for the page is incorrect!!!"); AboutPage.AboutCategoriesSection.Company.Click(); AboutCompanyPage.CheckOpened(); AboutCompanyPage.Back(); AboutPage.AboutCategoriesSection.Newsroom.Click(); }
public MainPage() { InitializeComponent(); this.Loaded += new RoutedEventHandler(MainPage_Loaded); HeaderMenu.HBHome.Click += new RoutedEventHandler(HBHome_Click); HeaderMenu.HBFullScreen.Click += new RoutedEventHandler(HBFullScreen_Click); HeaderMenu.SetUserNameAndDepartmentName(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeName, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName); HideWaitingControl(); }
public void CareerTest() { var attendee = new Attendee(); HomePage.IsOpened(); HeaderMenu2D.HoverAndClick("SOLUTIONS>Product Development"); ProductDevelopmentPage.CheckOpened(); HeaderMenu.Select(Headers.CAREERS); CareerPage.CheckOpened(); CareerPage.JobFilter.Search(attendee.Filter); JobListingPage.CheckOpened(); //new Check("Table is not empty").isFalse(jobListingPage.jobsList::isEmpty); //new Timer().Wait(() => !JobListingPage.JobsList.Empty); JobListingPage.GetJobRowByName("Test Automation Engineer (back-end)"); JobDescriptionPage.AddCvForm.Submit(attendee); //new Check("Captcha").Contains(() -> jobDescriptionPage.captcha.getAttribute("class"), "form-field-error"); }
public static void UpdateBook() { HeaderMenu.Show(); Console.WriteLine("You are at: > Books > Update book."); Console.WriteLine(""); Console.Write("Type the ID of the book you want to update:"); int id = Convert.ToInt32(Console.ReadLine()); Book book = BooksRepository.Find(id); if (book != null) { Console.WriteLine($"You have selected: {book.Title}"); Console.WriteLine(""); Console.Write("Type the new title of the book you want to update:"); book.Title = Console.ReadLine(); Console.WriteLine(""); Console.Write("Type the new price of the book you want to update:"); book.Price = Convert.ToDecimal(Console.ReadLine()); Console.WriteLine(""); BooksRepository.Update(book); Console.WriteLine(""); Console.WriteLine("Book updated successfully!"); Console.WriteLine(""); Console.WriteLine("Press any key to return."); Console.ReadKey(); } else { Console.WriteLine("Error. Invalid ID."); Console.WriteLine("Press any key to return."); Console.ReadKey(); return; } }
public static void UpdateGame() { HeaderMenu.Show(); Console.WriteLine("You are at: > Games > Update games."); Console.WriteLine(""); Console.Write("Type the ID of the game you want to update:"); int id = Convert.ToInt32(Console.ReadLine()); Game game = GamesRepository.Find(id); if (game != null) { Console.WriteLine($"You have selected: {game.Title}"); Console.WriteLine(""); Console.Write("Type the new title of the game you want to update:"); game.Title = Console.ReadLine(); Console.WriteLine(""); Console.Write("Type the new price of the game you want to update:"); game.Price = Convert.ToDecimal(Console.ReadLine()); Console.WriteLine(""); GamesRepository.Update(game); Console.WriteLine(""); Console.WriteLine("Game updated successfully!"); Console.WriteLine(""); Console.WriteLine("Press any key to return."); Console.ReadKey(); } else { Console.WriteLine("Error. Invalid ID."); Console.WriteLine("Press any key to return."); Console.ReadKey(); return; } }
public static void AddMagazine() { HeaderMenu.Show(); Console.WriteLine("You are at: > Magazines > Add new Magazine."); Console.WriteLine(""); Magazine magazine = new Magazine(); Console.Write("Insert magazine title:"); magazine.Title = Console.ReadLine(); Console.Write("Insert magazine price:"); magazine.Price = Convert.ToDecimal(Console.ReadLine()); MagazinesRepository.Insert(magazine); Console.WriteLine(""); Console.WriteLine("Magazine inserted successfully!"); Console.WriteLine(""); Console.WriteLine("Press any key to return."); Console.ReadKey(); }
public static void ListMagazine() { HeaderMenu.Show(); Console.WriteLine("You are at: > Magazines > List all magazines"); Console.WriteLine(""); Console.WriteLine($"╔{new string('═', 109)}╗"); Console.WriteLine($"║ MAGAZINES LIST{new string(' ', 94)}║"); Console.WriteLine($"╠═{new string('═', 3)}═╦═{new string('═', 20)}═╦═{new string('═', 40)}═╦═{new string('═', 10)}═╦═{new string('═', 10)}═╦═{new string('═', 9)}═╣"); Console.WriteLine($"║ {"ID",-3} ║ {"Category",-20} ║ {"Title",-40} ║ {"Publisher",-10} ║ {"Stock qty.",-10} ║ {"Price",-9} ║"); Console.WriteLine($"╠═{new string('═', 3)}═╬═{new string('═', 20)}═╬═{new string('═', 40)}═╬═{new string('═', 10)}═╬═{new string('═', 10)}═╬═{new string('═', 9)}═╣"); foreach (var magazine in MagazinesRepository.List()) { Console.WriteLine($"║ {magazine.ID,3} ║ {magazine.Category,-20} ║ {magazine.Title,-40} ║ {magazine.Publisher,-10} ║ {magazine.StockQuantity,10} ║ {magazine.Price,9:N2} ║"); } Console.WriteLine($"╚═{new string('═', 3)}═╩═{new string('═', 20)}═╩═{new string('═', 40)}═╩═{new string('═', 10)}═╩═{new string('═', 10)}═╩═{new string('═', 9)}═╝"); Console.WriteLine(""); Console.WriteLine("Press any key to return to magazines main menu..."); Console.ReadKey(); Show(); }
public static void ListBooks() { HeaderMenu.Show(); Console.WriteLine("You are at: > Books > List all books"); Console.WriteLine(""); Console.WriteLine($"╔{new string('═', 109)}╗"); Console.WriteLine($"║ BOOKS LIST{new string(' ', 98)}║"); Console.WriteLine($"╠═{new string('═', 3)}═╦═{new string('═', 20)}═╦═{new string('═', 40)}═╦═{new string('═', 10)}═╦═{new string('═', 10)}═╦═{new string('═', 9)}═╣"); Console.WriteLine($"║ {"ID",-3} ║ {"Category",-20} ║ {"Title",-40} ║ {"Publisher",-10} ║ {"Stock qty.",-10} ║ {"Price",-9} ║"); Console.WriteLine($"╠═{new string('═', 3)}═╬═{new string('═', 20)}═╬═{new string('═', 40)}═╬═{new string('═', 10)}═╬═{new string('═', 10)}═╬═{new string('═', 9)}═╣"); foreach (var book in BooksRepository.List()) { Console.WriteLine($"║ {book.ID,3} ║ {book.Category,-20} ║ {book.Title,-40} ║ {book.Publisher,-10} ║ {book.StockQuantity,10} ║ {book.Price,9:N2} ║"); } Console.WriteLine($"╚═{new string('═', 3)}═╩═{new string('═', 20)}═╩═{new string('═', 40)}═╩═{new string('═', 10)}═╩═{new string('═', 10)}═╩═{new string('═', 9)}═╝"); Console.WriteLine(""); Console.WriteLine("Press any key to return to books main menu..."); Console.ReadKey(); Show(); }
private void ConsultarCodigoButton_Click(object sender, EventArgs e) { HeaderMenu.Show(ConsultarCodigoButton, new System.Drawing.Point(0, 20)); }
void MainPage_Loaded(object sender, RoutedEventArgs e) { HeaderMenu.SetUserNameAndDepartmentName(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeName, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName); System.Windows.Controls.Window.Parent = windowParent; System.Windows.Controls.Window.TaskBar = new StackPanel(); System.Windows.Controls.Window.Wrapper = this; System.Windows.Controls.Window.IsShowtitle = false; /* * Test */ //SMT.Saas.Tools.PersonnelWS.PersonnelServiceClient a = new Saas.Tools.PersonnelWS.PersonnelServiceClient(); //System.Collections.ObjectModel.ObservableCollection<object> paras = new System.Collections.ObjectModel.ObservableCollection<object>(); //int pageCount = 0; //string abc = "@0.Contains(Mobile) or @1.Contains(Tel) or @2.Contains(EmployeeCNName) or @3.Contains(PostName) or @4.Contains(DepartMentName)"; //paras.Add("刘映"); //paras.Add("刘映"); //paras.Add("刘映"); //paras.Add("刘映"); //paras.Add("刘映"); //a.GetEmployeeListMobileAsync(1, 20, "EmployeeCNName", abc, paras, pageCount, "bbac270b-120d-4b6d-bc72-22fa6476ec9f", false); //a.GetEmployeeListMobileCompleted += (oo, ee) => // { // IEnumerable<SMT.Saas.Tools.PersonnelWS.V_MOBILEEMPLOYEE> list; // list = ee.Result.ToList().Distinct(); // }; //SMT.Saas.Tools.SalaryWS.SalaryServiceClient a = new Saas.Tools.SalaryWS.SalaryServiceClient(); //SMT.Saas.Tools.SalaryWS.T_HR_CUSTOMGUERDONARCHIVE custom = new Saas.Tools.SalaryWS.T_HR_CUSTOMGUERDONARCHIVE //{ // CUSTOMGUERDONARCHIVEID = "aeb0e17b-e650-45c8-9380-f3e569c71778", // SUM = decimal.Parse("5555555"), // REMARK = "6666666666" //}; //custom.T_HR_SALARYARCHIVE = new SMT.Saas.Tools.SalaryWS.T_HR_SALARYARCHIVE(); //custom.T_HR_SALARYARCHIVE.SALARYARCHIVEID="b355b0b8-be24-4ab7-8258-0c8646597a45"; //a.CustomGuerdonArchiveUpdateAsync(custom); //ObservableCollection<SMT.Saas.Tools.PersonnelWS.V_EMPLOYEEPOSTFORFB> list = new ObservableCollection<Saas.Tools.PersonnelWS.V_EMPLOYEEPOSTFORFB>(); //SMT.Saas.Tools.PersonnelWS.V_EMPLOYEEPOSTFORFB employee = new Saas.Tools.PersonnelWS.V_EMPLOYEEPOSTFORFB //{ // OWNERID = "27f547f7-bae4-4df4-ae03-07b579afcae0", // OWNERPOSTID = "c51a4e93-265d-45a0-aa16-3c9f0ebf27d8", // PERSONBUDGETAPPLYDETAILID = "022edac5-f060-4d41-a510-defaf6955230" //}; //SMT.Saas.Tools.PersonnelWS.V_EMPLOYEEPOSTFORFB employee1 = new Saas.Tools.PersonnelWS.V_EMPLOYEEPOSTFORFB //{ // OWNERID = "eb732bab-8589-43a9-b51a-f13d72b056cc", // OWNERPOSTID = "782541c5-86f9-4658-947d-61d264554640", // PERSONBUDGETAPPLYDETAILID = "022edac5-f060-4d41-a510-defaf6955230" //}; //SMT.Saas.Tools.PersonnelWS.V_EMPLOYEEPOSTFORFB employee2 = new Saas.Tools.PersonnelWS.V_EMPLOYEEPOSTFORFB //{ // OWNERID = "0a9cfa23-acff-49fb-9b6d-3d3eac7608ca", // OWNERPOSTID = "dd9048f5-0125-4e0b-8e79-9f6ef1c39dd5", // PERSONBUDGETAPPLYDETAILID = "022edac5-f060-4d41-a510-defaf6955230" //}; //list.Add(employee); //////list.Add(employee1); //////list.Add(employee2); //ObservableCollection<SMT.Saas.Tools.PersonnelWS.V_EMPLOYEEPOSTFORFB> listResult = new ObservableCollection<Saas.Tools.PersonnelWS.V_EMPLOYEEPOSTFORFB>(); //a.GetEmployeeListForFBAsync(list); //a.GetEmployeeListForFBCompleted += (obj, eve) => // { // listResult = eve.Result; // string rer = ""; // }; }
public void ElementsTest_Link_Text() { HeaderMenu.Select(HeaderMenuValues.CAREERS); Assert.IsTrue(CareerPage.HeaderMenuCrumbs.Text.Contains("Home"), "Breadcrumb of first level is incorrect"); }