Beispiel #1
0
        public WebTree(WebElement treeContainer)
        {
            WebElement rootNode = treeContainer.FindRelative()
                                  .ByTagName(WEBUIautomation.Tags.TagNames.Li)
                                  .ByClass(ContentLocators.Locators.TreeHelperLocators.rootFolderClassValue);

            this.Root = new WebFolderNode(rootNode);
        }
Beispiel #2
0
        public static void TryExpandTreeFolder(this IWebDriverExt driver, string folderName)
        {
            string collapsed = @".//span[@class='rtPlus']";

            WebElement currentFolder = driver.FindTreeItemByName(folderName);

            WebElement parentElement = currentFolder.GetParent();

            WaitHelper.Try(() => parentElement.FindRelative().ByXPath(collapsed).Click());
        }
Beispiel #3
0
        private DltGroupsAndWorkloadPage checkWorkLoadMode(WorkloadMode mode)
        {
            if (mode == WorkloadMode.SimpleByLTByNumber || mode == WorkloadMode.SimpleByLTByPrecentage)
            {
                string     id    = WorkloadMode.SimpleByLT.GetEnumDescription();
                WebElement image = workloadTypeDialog.FindRelative().ById(id);
                image.ClickPerform();
            }

            if (mode == WorkloadMode.ComplexByLTByNumber || mode == WorkloadMode.ComplexByLTByPrecentage)
            {
                string     id    = WorkloadMode.ComplexByLT.GetEnumDescription();
                WebElement image = workloadTypeDialog.FindRelative().ById(id);
                image.ClickPerform();
            }

            WebElement item = workloadTypeDialog.FindRelative().ById(mode.GetEnumDescription());

            item.ClickPerform();

            return(this);
        }
        //Runs
        //Last modified entities
        //Resources

        private WebElement TestLinkFinishedTest(string testName, int testRunId)
        {
            //Find link to Id
            WebElement linkToId = mainPage.GetElement()
                                  .ByAttribute(WEBUIautomation.Tags.TagAttributes.NgClick, Locators.runIdLinkNgClassValue)
                                  .ByText(testRunId.ToString());

            WebElement parent = linkToId.GetParent(); //Return to parent


            WebElement linkToFinishedTest = parent.FindRelative() //Down to the test link
                                            .ByAttribute(WEBUIautomation.Tags.TagAttributes.Class, Locators.testLinkClassValue)
                                            .ByText(testName);

            return(linkToFinishedTest);
        }
 public static WebElement SelectListItem(this WebElement webElement, string listItemText)
 {
     return(webElement.FindRelative().ByTagName(TagNames.Li).ByText(listItemText));
 }
 public static WebElement GetParent(this WebElement webElement)
 {
     return(webElement.FindRelative().ByXPath(".."));
 }