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()); }
//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); }