public void VerifyValidLogin() { LoginSteps loginSteps = new LoginSteps(_testOutputHelper); var loginText = loginSteps.Login("*****@*****.**", "password"); Assert.Equal(loginText, "My Account"); }
public void Test1() { var loginSteps = new LoginSteps(Driver); loginSteps.Login(); Assert.AreEqual("All Projects - TestRail", Driver.Title); Assert.IsTrue(new DashboardPage(Driver).IsPageOpened()); }
public new void OneTimeSetUp() { var loginSteps = new LoginSteps(Driver); loginSteps.Login(); _projectService = new ProjectService(); _addProjectSteps = new AddProjectSteps(Driver); }
public void Test2() { var loginSteps = new LoginSteps(Driver); loginSteps.Login(); var element = WaitService.GetVisibleElement(By.Id("sidebar-projects-add")); Console.Out.WriteLine(element.Displayed); }
public void TestHelpDropdownSelectByText() { var loginSteps = new LoginSteps(Driver); loginSteps.Login(); var dashboardPage = new DashboardPage(Driver); dashboardPage.HelpDropdownButton.Click(); Console.Out.WriteLine(dashboardPage.HelpDropdown.Displayed); dashboardPage.HelpDropdown.SelectByText("TestRail User Guide"); }
public void TestUserDropdownSelectByText() { var loginSteps = new LoginSteps(Driver); loginSteps.Login(); var dashboardPage = new DashboardPage(Driver); dashboardPage.UserDropdownButton.Click(); Assert.IsTrue(dashboardPage.UserDropdown.Displayed); dashboardPage.UserDropdown.SelectByText("My Settings"); }
public void TestProgressDropDown() { var loginSteps = new LoginSteps(Driver); loginSteps.Login(); var dashboardPage = new DashboardPage(Driver); dashboardPage.InProgressDropdownButton.Click(); Console.Out.WriteLine(dashboardPage.InProgressDropdown.Displayed); Console.Out.WriteLine(dashboardPage.InProgressDropdown.Text); Assert.AreEqual(dashboardPage.InProgressDropdown.Text, $"In Progress\n There are no tests you are currently working on." + $" You can use the Progress feature to indicate that you are working on a test."); }
public static void BaseProfileSetup() { if (!TestConfig.UseProfiles) { return; } Parallel.ForEach(UserProfileDirectories.Keys, (username) => { var profileDirectory = UserProfileDirectories[username]; var baseDirectory = Path.Combine(profileDirectory, "base"); // SpecFlow isolation settings may run scenarios in different processes or AppDomains and [BeforeTestRun] runs per thread. Lock statement insufficient. using (var mutex = new Mutex(true, $"{nameof(BaseProfileSetup)}-{username}", out var createdNew)) { if (!createdNew) { mutex.WaitOne(); } if (Directory.Exists(baseDirectory)) { mutex.ReleaseMutex(); return; } try { Directory.CreateDirectory(baseDirectory); var userBrowserOptions = (BrowserOptionsWithProfileSupport)TestConfig.BrowserOptions.Clone(); userBrowserOptions.ProfileDirectory = baseDirectory; userBrowserOptions.Headless = true; var webClient = new WebClient(userBrowserOptions); using (new XrmApp(webClient)) { var user = TestConfig.Users.First(u => u.Username == username); LoginSteps.Login(webClient.Browser.Driver, TestConfig.GetTestUrl(), user.Username, user.Password); } } finally { mutex.ReleaseMutex(); } } });
public void Test1() { var loginSteps = new LoginSteps(Driver); loginSteps.Login(); var dashBoardPage = new DashboardPage(Driver); dashBoardPage.SidebarProjectsAdd.Click(); var addProjectPage = new AddProjectPage(Driver); addProjectPage.Name.SendKeys("test-wrappers-radioButton"); addProjectPage.ModeSuite.SelectById("suite_mode_single_baseline"); addProjectPage.AddProject.Click(); }
public void Test3() { var loginSteps = new LoginSteps(Driver); loginSteps.Login(); var dashBoardPage = new DashboardPage(Driver); dashBoardPage.SidebarProjectsAdd.Click(); var addProjectPage = new AddProjectPage(Driver); addProjectPage.Name.SendKeys("radioBut2"); addProjectPage.ModeSuite.SelectByValue("2"); /*var radioButton = new RadioButton(Driver, By.XPath("//div[@class='radio']")); * radioButton.SelectByValue("2");*/ // addProjectPage.AddProjectButton.Click(); Thread.Sleep(1000); }
public void Test2() { var loginSteps = new LoginSteps(Driver); loginSteps.Login(); var dashBoardPage = new DashboardPage(Driver); dashBoardPage.SidebarProjectsAdd.Click(); var addProjectPage = new AddProjectPage(Driver); addProjectPage.AddProject.Click(); var checkBox = new CheckBox(Driver, By.Id("show_announcement")); //var radioButton = new RadioButton(Driver, By.ClassName("radio")); // radioButton.SelectById("suite_mode_single_baseline"); Console.Out.WriteLine(checkBox.Selected); checkBox.Click(); Console.Out.WriteLine(checkBox.Selected); }
public void DadoRealizaOLogin() { LoginSteps.Login(Browser); Thread.Sleep(5000); }