@Test public void test05_SearchNodeTypeAll() { String keyword = "*"; info("Search all node types"); magNode.doNodeTypeSearch(keyword); Utils.captureScreen("test05_SearchNodeTypeAll"); }
@Test public void test03_SearchNodeTypeNotMatch() { String keyword = RandomStringUtils.randomAlphabetic(20); info("Search Node Type when no Node type match with keyword"); magNode.doNodeTypeSearch(keyword); waitForTextPresent(magNode.MESSAGE_FOR_NOT_MATCH_KEYWORD); }
@Test public void test01_SearchNodeTypeNotInputKeyword() { info("Search Node Type when don't input keyword"); magNode.doNodeTypeSearch(""); waitForTextPresent(magNode.MESSAGE_FOR_NO_INPUT_KEYWORD); click(button.ELEMENT_OK_BUTTON); }
@Test public void test04_SearchNodeTypeMatch() { String keyword = "application"; info("Search Node type when there are some corresponding node types with keyword"); magNode.doNodeTypeSearch(keyword); Utils.pause(500); List<WebElement> result = driver.findElements(By.xpath("//table[contains(@class, 'uiGrid')]/tbody//tr")); for (WebElement tr : result) { if (tr.findElement(By.xpath("//div[@class='text' and contains(text(),'" + keyword + "')]")) == null) { assert false : ("This row don't contain keyword"); } } }
@Test public void test02_SearchNodeTypeWithSpecialChars() { info("Search node type with a set of special characters"); magNode.doNodeTypeSearch("!@#$%^&()_{}[]|\"/?><,~`"); waitForTextPresent(magNode.MESSAGE_FOR_SPECIAL_KEYWORD); }