Example #1
0
 public NewProjectPage SetIdentifier(string projectIdentifier)
 {
     textboxProjectIdentifier = SearchElementUtil.GetElement(driver, locatorTextboxProjectIdentifier);
     textboxProjectIdentifier.Clear();
     textboxProjectIdentifier.SendKeys(projectIdentifier);
     return(this);
 }
Example #2
0
 public string GetNotificationAboutCreationText()
 {
     if (!IsSuccessfulCreation())
     {
         notificationAboutCreation = (BaseElement)SearchElementUtil.GetElement(driver, locatorNegativeNotification);
     }
     return(notificationAboutCreation.Text);
 }
Example #3
0
 public NewIssuePage SelectType(IssueType type)
 {
     comboboxIssueType = new SelectElement(SearchElementUtil.GetElement(driver, locatorComboboxIssueType));
     if (type != IssueType.Default)
     {
         comboboxIssueType.SelectByText(type.ToString().Replace(" ", ""));
     }
     return(this);
 }
Example #4
0
 //where should use??
 public Notifications GetCreationResult()
 {
     if (IsSuccessfulCreation())
     {
         return(Notifications.Positive);
     }
     notificationAboutCreation = (BaseElement)SearchElementUtil.GetElement(driver, locatorNegativeNotification);
     return(Notifications.Negative);
 }
Example #5
0
 public NewIssuePage SelectStatus(IssueStatus status)
 {
     comboboxStatus = new SelectElement(SearchElementUtil.GetElement(driver, locatorComboboxStatus));
     if (status != IssueStatus.Default)
     {
         comboboxStatus.SelectByText(status.ToString().Replace(" ", ""));
     }
     return(this);
 }
Example #6
0
 public NewIssuePage SelectPriority(IssuePriority priority)
 {
     comboboxPriority = new SelectElement(SearchElementUtil.GetElement(driver, locatorComboboxPriority));
     if (priority != IssuePriority.Default)
     {
         comboboxPriority.SelectByText(priority.ToString());
     }
     return(this);
 }
Example #7
0
 public NewProjectPage SelectInheritMembers(bool tickParam = true)
 {
     checkboxInheritMembers = SearchElementUtil.GetElement(driver, locatorCheckboxInheritMembers);
     if (tickParam)
     {
         ((BaseElement)checkboxInheritMembers).Check();
     }
     else
     {
         ((BaseElement)checkboxInheritMembers).Uncheck();
     }
     return(this);
 }
Example #8
0
 public NewIssuePage SetDescription(string issueDescription)
 {
     textboxDescription = SearchElementUtil.GetElement(driver, locatorTextboxDescription);
     textboxDescription.SendKeys(issueDescription);
     return(this);
 }
Example #9
0
 public NewIssuePage SetSubject(string issueSubject)
 {
     textboxSubject = SearchElementUtil.GetElement(driver, locatorTextboxSubject);
     textboxSubject.SendKeys(issueSubject);
     return(this);
 }
Example #10
0
 public HomePage ClickSubmit()
 {
     buttonLogin = SearchElementUtil.GetElement(driver, locatorButtonLogin);
     buttonLogin.Click();
     return(new HomePage(driver));
 }
Example #11
0
 public HomePage(IWebDriver driver) : base(driver)
 {
     loginIdentifier = SearchElementUtil.GetElement(driver, loginIdentifierLocator);
 }
Example #12
0
 public CreatedIssuePage ClickCreate()
 {
     buttonCreate = SearchElementUtil.GetElement(driver, locatorButtonCreate);
     buttonCreate.Click();
     return(new CreatedIssuePage(driver));
 }
Example #13
0
 public NewProjectPage ClickCreate()
 {
     buttonCreate = (BaseElement)SearchElementUtil.GetElement(driver, locatorButtonCreate);
     buttonCreate.Click();
     return(this);
 }
Example #14
0
 public NewProjectPage SetHomepage(string homepage)
 {
     textboxHomepage = SearchElementUtil.GetElement(driver, locatorTextboxHomepage);
     textboxHomepage.SendKeys(homepage);
     return(this);
 }
Example #15
0
 public NewProjectPage SetDescription(string projectDescription)
 {
     textboxProjectDescription = (BaseElement)SearchElementUtil.GetElement(driver, locatorTextboxProjectDescription);
     textboxProjectDescription.SendKeys(projectDescription);
     return(this);
 }
Example #16
0
 public NewProjectPage SetName(string projectName)
 {
     textboxProjectName = (BaseElement)SearchElementUtil.GetElement(driver, locatorTextboxProjectName);
     textboxProjectName.SendKeys(projectName);
     return(this);
 }
Example #17
0
 public bool IsIssueCreated(IWebDriver driver, string issueName)
 {
     activityContent = SearchElementUtil.GetElement(driver, activityContentLocator);
     return(activityContent.FindElements(By.XPath("//dt//a")).Any(element => element.Text.Contains(issueName)));
 }
Example #18
0
 public LoginPage SetUser(string login)
 {
     textboxUser = SearchElementUtil.GetElement(driver, locatorTextboxUser);
     textboxUser.SendKeys(login);
     return(this);
 }
Example #19
0
 public BasePage(IWebDriver driver)
 {
     this.driver = driver;
     SearchElementUtil.WaitElement(driver, By.XPath("//title"), timeout);
 }
Example #20
0
 public LoginPage SetPassword(string password)
 {
     textboxPassword = SearchElementUtil.GetElement(driver, locatorTextboxPassword);
     textboxPassword.SendKeys(password);
     return(this);
 }
Example #21
0
 public LoginPage LogoutHomePage()
 {
     logout = SearchElementUtil.GetElement(driver, logoutLocator);
     logout.Click();
     return(new LoginPage());
 }
Example #22
0
 public bool IsSuccessfulCreation()
 {
     notificationAboutCreation = (BaseElement)SearchElementUtil.GetElement(driver, locatorPositiveNotification);
     return(notificationAboutCreation != null && notificationAboutCreation.Displayed);
 }