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