- * @param gridRow
- */
- public ExtJSGridRow(WebElement gridRow){
- //validate
-
- this.gridRow = gridRow;
- this.listColumns = this.gridRow.findElements(By.cssSelector("td.x-grid3-col.x-grid3-cell:not([style='display:none'])"));
- }
-
- /**
- * Get the cell(row, column) text
- * @param columnNumber one based index of the column
- * @return the text of the cell
- */
- public String getRowColumnText(Integer columnNumber){
- WebElement cell = this.listColumns.get(columnNumber-1).findElement(By.className("x-grid3-cell-inner"));
- return cell.getText();
- }
-
- public int countColumns(){
- return this.listColumns.size();
- }
-
- public WebElement getGridRow(){
- return this.gridRow;
- }
-
-}
diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSMenuItem.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSMenuItem.java
deleted file mode 100644
index b6a83679f..000000000
--- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSMenuItem.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.colosa.qa.automatization.common.extJs;
-
-import org.openqa.selenium.By;
-import org.openqa.selenium.WebElement;
-
-/**
- * Created with IntelliJ IDEA.
- * User: herbert
- * Date: 12/17/13
- * Time: 2:16 PM
- * To change this template use File | Settings | File Templates.
- */
-public class ExtJSMenuItem {
- WebElement menuItem = null;
- WebElement menuItemText = null;
-
- public ExtJSMenuItem(WebElement menuItem){
- this.menuItem = menuItem;
- this.menuItemText = this.menuItem.findElement(By.className("x-menu-item-text"));
- }
-
- /**
- * Click element in Menu
- */
- public void click(){
- this.menuItem.click();
- }
-
- /**
- * Get text in menu
- * @return
- */
- public String getText(){
-
- return this.menuItemText.getText();
- }
-}
diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSToolbar.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSToolbar.java
deleted file mode 100644
index dd249d904..000000000
--- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSToolbar.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package com.colosa.qa.automatization.common.extJs;
-
-import com.colosa.qa.automatization.common.BrowserInstance;
-import com.colosa.qa.automatization.common.Logger;
-import com.colosa.qa.automatization.common.WaitTool;
-import org.openqa.selenium.By;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.WebElement;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Created with IntelliJ IDEA.
- * User: herbert
- * Date: 6/10/13
- * Time: 1:33 PM
- * To change this template use File | Settings | File Templates.
- */
-public class ExtJSToolbar {
- private BrowserInstance browserInstance;
- private WebElement toolbar;
- private WebElement toolbarContent;
- private List
listExtJSToolbarCells;
- List auxSearchList;
-
-
- /**
- * Represents a ExtJs Toolbar
- * @param toolbar element with class x-toolbar
- * @param browserInstance browser instance
- */
- public ExtJSToolbar(WebElement toolbar, BrowserInstance browserInstance) throws Exception {
- this.browserInstance = browserInstance;
- this.toolbar = toolbar;
-
- String classAttribute = toolbar.getAttribute("class");
- if(classAttribute.contains("x-toolbar")){
- //this is the toolbar element
- Logger.addLog("The passed element is the same toolbar: x-toolbar");
- this.toolbar = toolbar;
- }else{
- //search for the toolbar element
- //Logger.addLog("before Toolbar find x-panel-tbar");
- // findElement should not be used to look for non-present elements, use findElements(By) and assert zero length response instead.
- auxSearchList = toolbar.findElements(By.className("x-toolbar"));
- if(auxSearchList.size() > 0){
- //use the first x-toolbar found
- this.toolbar = auxSearchList.get(0);
- Logger.addLog("Toolbar found x-toolbar");
- }else
- {
- throw new Exception("Toolbar not found in specified element.");
- }
- }
-
- //Logger.addLog("before Toolbar find x-toolbar-ct");
- auxSearchList = this.toolbar.findElements(By.className("x-toolbar-ct"));
- if(auxSearchList.size() > 0){
- this.toolbarContent = auxSearchList.get(0);
- Logger.addLog("Toolbar content found x-toolbar-ct");
- }else
- {
- throw new Exception("Toolbar content not found in toolbar element.");
- }
-
- //detect all toolbar cells
- this.listExtJSToolbarCells = queryListToolbarCells();
- }
-
- private List queryListToolbarCells(){
-
- List listCells = this.toolbarContent.findElements(By.cssSelector("td.x-toolbar-cell"));
- Logger.addLog("Get current list of cells: " + listCells.size());
-
-
- List listToolbarCells = new ArrayList(listCells.size());
-
- for (WebElement toolbarCell : listCells) {
- listToolbarCells.add(new ExtJSToolbarCell(toolbarCell, this.browserInstance));
-
- Logger.addLog(" cell data: " + toolbarCell.getTagName() + ":" + toolbarCell.getText());
- }
-
- return listToolbarCells;
- }
-
- public List getListToolbarCells(){
- return queryListToolbarCells();
- }
-
- /**
- * Find cell in toolbar based in the cell text.
- * @param buttonText text to search cell
- * @return ExtJSToolbarCell found cell null in other case.
- */
- public ExtJSToolbarCell findToolbarCell(String buttonText){
- ExtJSToolbarCell resultToolbarCell = null;
-
- for (ExtJSToolbarCell extjsToolbarCell : this.listExtJSToolbarCells) {
- Logger.addLog(" toolbar cell:" + extjsToolbarCell.getCellText() + "==" + buttonText);
-
- if(extjsToolbarCell.getCellText().trim().equals(buttonText)){
- Logger.addLog(" toolbar cell found:" + extjsToolbarCell.getCellText());
- resultToolbarCell = extjsToolbarCell;
- break;
- }
- }
-
- return resultToolbarCell;
- }
-
- /**
- * Find Toolbar cell in base to zero based index of cell
- * @param cellIndex The Zero based index of the cell to return.
- * @return ExtJSToolbarCell the found cell
- */
- public ExtJSToolbarCell findToolbarCell(int cellIndex){
- ExtJSToolbarCell resultToolbarCell = null;
- resultToolbarCell = this.listExtJSToolbarCells.get(cellIndex);
- WaitTool.waitForElementVisibleAndEnable(browserInstance.getInstanceDriver(), resultToolbarCell.getWebElement(), 5);
- Logger.addLog(" return toolbar cell:" + cellIndex);
- return resultToolbarCell;
- }
-
- /*
- public ExtJSToolbarCell waitForToolbarCellDisplay(int cellIndex){
- ExtJSToolbarCell resultToolbarCell = null;
- resultToolbarCell = this.listExtJSToolbarCells.get(cellIndex);
-
- //resultToolbarCell.getWebElement().isDisplayed();
- //Logger.addLog(" return toolbar cell:" + cellIndex);
- return resultToolbarCell;
- }*/
-
-
-}
diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSToolbarCell.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSToolbarCell.java
deleted file mode 100644
index 04b4ee0fc..000000000
--- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSToolbarCell.java
+++ /dev/null
@@ -1,173 +0,0 @@
-package com.colosa.qa.automatization.common.extJs;
-
-import com.colosa.qa.automatization.common.BrowserInstance;
-import com.colosa.qa.automatization.common.Logger;
-import org.openqa.selenium.By;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.WebElement;
-
-import java.util.List;
-
-/**
- * Created with IntelliJ IDEA.
- * User: herbert
- * Date: 6/10/13
- * Time: 1:45 PM
- * To change this template use File | Settings | File Templates.
- */
-public class ExtJSToolbarCell {
- private BrowserInstance browserInstance;
- private WebElement toolbarCell; //element with class x-toolbar-cell
- private List toolbarCellOptions;
- /*private WebElement toolbarCellButton;
- private WebElement toolbarCellText;
- private WebElement toolbarCellSeparator;
- private WebElement toolbarCellWrap;*/
-
- /**
- * Initialize with an element that represent a Toolbar Cell, that has the class x-toolbar-cell
- * @param toolbarCell webelement with class x-toolbar-cell
- * @param browserInstance browser instance
- */
- public ExtJSToolbarCell(WebElement toolbarCell, BrowserInstance browserInstance) {
- this.browserInstance = browserInstance;
-
- //this.headerToolbar = this.grid.findElement(By.cssSelector("div.x-panel-tbar"));
- //this.headerToolbarCells = this.headerToolbar.findElements(By.cssSelector("td.x-toolbar-cell"));
- this.toolbarCell = toolbarCell;
- //WebElement toolbarCellContent;
- //get the child
- /*
- this.toolbarCellTable = this.toolbarCell.findElement(By.cssSelector("table"));
- this.driver = driver;
-
- //detect what type of cell is
- String classAttribute = this.toolbarCellTable.getAttribute("class");
-
- */
- /*
- Logger.addLog("New Toolbar cell identify type");
-
- this.browserInstance.turnOffImplicitWaits();
- this.toolbarCellOptions = this.toolbarCell.findElements(By.cssSelector(".x-btn, .xtb-text, .xtb-sep, .x-form-field-wrap"));
- this.browserInstance.turnOnImplicitWaits();
-
- if(this.toolbarCellOptions.size() > 0){
- Logger.addLog("Toolbar element found!!!");
- //an element was found
- toolbarCellContent = this.toolbarCellOptions.get(0);
- //detect what type of cell is
- String classAttribute = toolbarCellContent.getAttribute("class");
- if(classAttribute.contains("x-btn")){
- Logger.addLog("It's a button!!!");
- this.toolbarCellButton = toolbarCellContent;
- Logger.addLog(" text:" + getCellText());
- }
-
- if(classAttribute.contains("xtb-text")){
- Logger.addLog("It's a text!!!");
- this.toolbarCellText = toolbarCellContent;
- Logger.addLog(" text:" + getCellText());
- }
-
- if(classAttribute.contains("xtb-sep")){
- Logger.addLog("It's a separator!!!");
- this.toolbarCellSeparator = toolbarCellContent;
- Logger.addLog(" text:" + getCellText());
- }
-
- if(classAttribute.contains("x-form-field-wrap")){
- Logger.addLog("It's a wrapper!!!");
- this.toolbarCellWrap = toolbarCellContent;
- Logger.addLog(" text:" + getCellText());
- }
- } */
- }
-
- /**
- * Get webelement of toolbar-cell
- */
- public WebElement getWebElement(){
- return this.toolbarCell;
- //html.ext-strict body#ext-gen3.ext-gecko div#navPanel.x-panel div#ext-gen16.x-panel-bwrap div#ext-gen17.x-panel-tbar div#ext-comp-1004.x-toolbar table.x-toolbar-ct tbody tr td.x-toolbar-left table tbody tr.x-toolbar-left-row td#ext-gen27.x-toolbar-cell table#caseNotes.x-btn tbody.x-btn-small tr td.x-btn-mc em button#ext-gen28.x-btn-text
- }
-
- /**
- * Click any non-identified element in toolbar-cell
- */
- public void click(){
- this.toolbarCell.click();
- //html.ext-strict body#ext-gen3.ext-gecko div#navPanel.x-panel div#ext-gen16.x-panel-bwrap div#ext-gen17.x-panel-tbar div#ext-comp-1004.x-toolbar table.x-toolbar-ct tbody tr td.x-toolbar-left table tbody tr.x-toolbar-left-row td#ext-gen27.x-toolbar-cell table#caseNotes.x-btn tbody.x-btn-small tr td.x-btn-mc em button#ext-gen28.x-btn-text
- }
-
- /**
- * Click toolbar button
- */
- public void clickButton() throws Exception {
- WebElement cellButton = null;
- Logger.addLog("click button");
-
- this.browserInstance.turnOffImplicitWaits();
- this.toolbarCellOptions = this.toolbarCell.findElements(By.cssSelector(".x-btn"));
- this.browserInstance.turnOnImplicitWaits();
-
- if(this.toolbarCellOptions.size() > 0){
- Logger.addLog("button element found!!!");
- //an element was found
- cellButton = this.toolbarCellOptions.get(0);
- cellButton.findElement(By.cssSelector("button")).click();
- }else{
- throw new Exception("Button not found!!");
- }
-
- //x-btn x-btn-text-icon
- //click the element if is a button
- }
-
- /**
- * Get text in cell
- * @return
- */
- public String getCellText(){
- String cellText = "";
-
- cellText = this.toolbarCell.getText();
-
- /*
- //if is a button or a text get the text
- // x-btn-text
- if(this.toolbarCellText != null){
-
- cellText = this.toolbarCellText.getText();
- //Logger.addLog("Cell text:" + cellText);
- }
-
- if(this.toolbarCellButton != null){
- WebElement button = this.toolbarCellButton.findElement(By.className("x-btn-text"));
- if(button != null){
- cellText = button.getText();
- //Logger.addLog("Button text:" + cellText);
- }
- }
-
- if(this.toolbarCellSeparator != null){
- cellText = "|";
- //Logger.addLog("Separator text:" + cellText);
- }
-
- if(this.toolbarCellWrap != null){
- cellText = "[]";
- //Logger.addLog("Wrap text:" + cellText);
- } */
-
- return cellText;
- }
-
- /**
- * Set text in cell
- * @param text
- */
- public void setCellText(String text){
- this.toolbarCell.sendKeys(text);
- }
-}
diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSTree.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSTree.java
deleted file mode 100644
index f7179db13..000000000
--- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSTree.java
+++ /dev/null
@@ -1,400 +0,0 @@
-package com.colosa.qa.automatization.common.extJs;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.colosa.qa.automatization.common.Logger;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.WebElement;
-import org.openqa.selenium.By;
-
-public class ExtJSTree{
-
- private WebDriver driver;
- private WebElement tree;
- private int timeout;
- private WebElement currentNode;
- private WebElement root = null;
- private List listTreeRootNodes;
-
- /**
- * Class used to manage - navigate ext-js tree
- * @param tree the web element that is most near to the element that has the class atribute= " x-tree-root-ct"
- * The first element with this class is selected as the root of the tree.
- * @param driver the web driver
- */
- public ExtJSTree(WebElement tree, WebDriver driver) throws Exception {
- this.driver = driver;
- this.tree = tree;
- //this.timeout = timeout;
- //element with class x-tree-root-ct
- Logger.addLog("ExtJSTree()->find x-tree-root-ct");
- this.root = tree.findElement(By.className("x-tree-root-ct"));//(By.xpath("div/div/ul/div"));
- if(this.root == null){
- //change of root node
- throw new Exception("No ExtJs tree structure found. The specified element is not a tree.");
- }
-
- //check if there's another level
- WebElement auxRoot = null;
- auxRoot = this.root.findElement(By.className("x-tree-root-node"));
- if(auxRoot != null){
- //change of root node
- this.root =auxRoot;
- }
-
- //this.currentNode = this.root;
-
- this.readTreeNodes();
-
- //check if node was found
- if(this.root == null){
- throw new Exception("No ExtJs tree structure found.");
- }
- }
-
- public List readTreeNodes(){
- List rootNodes = null;
-
- //search root nodes
- rootNodes = this.root.findElements(By.cssSelector(this.root.getTagName() + " > li.x-tree-node:not([style='display: none;'])")); //style="" [style='']
- //rootNodes = this.root.findElements(By.cssSelector("x-tree-node-el"));
-
- listTreeRootNodes = new ArrayList(rootNodes.size());
-
- Logger.addLog("ExtJSTree()->getListRootNodes list x-tree-node-el: " + rootNodes.size());
-
- for (WebElement rootNode : rootNodes) {
-
- ExtJSTreeNode newTreeNode = new ExtJSTreeNode(rootNode, this.driver);
-
- Logger.addLog("ExtJSTree()->rootNode: " + newTreeNode.getNodeText());
-
- listTreeRootNodes.add(newTreeNode);
- }
-
- return listTreeRootNodes;
- }
-
- /**
- * Go to element that represent the root "/"
- */
- public void gotoRoot(){
- //this.root.findElement(By.xpath("div/a/span")).click();
- this.root = tree.findElement(By.className("x-tree-root-ct"));
- this.currentNode = this.root;
- }
-
- public void refresh(){
- this.tree.findElement(By.xpath("div[1]/div[1]")).click();
- //talvez esperar a que se termine de cargar
- }
-
- public List getListRootNodes(){
- /*List rootNodes = null;
-
- //search root nodes
- rootNodes = this.root.findElements(By.cssSelector(this.root.getTagName() + " > li.x-tree-node")); //style="" [style='']
- //rootNodes = this.root.findElements(By.cssSelector("x-tree-node-el"));
-
- List listTreeRootNodes = new ArrayList(rootNodes.size());
-
- Logger.addLog("ExtJSTree()->getListRootNodes list x-tree-node-el: " + listTreeRootNodes.size());
-
- for (WebElement rootNode : rootNodes) {
-
- ExtJSTreeNode newTreeNode = new ExtJSTreeNode(rootNode, this.driver);
-
- Logger.addLog("ExtJSTree()->rootNode: " + newTreeNode.getNodeText());
-
- listTreeRootNodes.add(newTreeNode);
- }
-
- return listTreeRootNodes;*/
- return listTreeRootNodes;
- }
-
- /**
- * Select the specified node in the tree from the root
- * @param nodePath The path to the node, start with /rootNode/nodelevel1/nodelevel2 etc.
- * The complete path must be specified. Regular expressions are supported.
- * @return The found tree node
- */
- public ExtJSTreeNode getTreeNode(String nodePath, Boolean useRegularExpresion) throws Exception {
- //ExtJSTreeNode treeNodeModel = new ExtJSTreeNode();
-
- return ExtJSTreeNode.getTreeNodeInList(this.listTreeRootNodes, nodePath, useRegularExpresion);
-
- /*
- ExtJSTreeNode resultTreeNode = null;
- String searchPath = path;
-
- //search first node from left of path (root node)
- String nodeName = getLeftNodePath(searchPath);
- searchPath = removeLeftNodePath(searchPath);
-
- Logger.addLog("ExtJSTree()->getTreeNode: search node:" + nodeName + " pending path:" + searchPath );
-
-
- //search in root nodes
- for(ExtJSTreeNode rootNodeElement:this.listTreeRootNodes){
-
- //check if is the same node
- if(useRegularExpresion){
- Logger.addLog("ExtJSTree()->getTreeNode: usign reg expresions if "+ rootNodeElement.getNodeText() + "== " + nodeName );
- if(rootNodeElement.getNodeText().matches(nodeName)){
- //verify if is the node that we are searching for
- if(searchPath.equals("")){
- //this is the search node
- resultTreeNode = rootNodeElement;
- }else{
- //continue searching nodes
- resultTreeNode = rootNodeElement.getTreeNode(searchPath, useRegularExpresion);
- }
- break;
- }
- }else{
- Logger.addLog("ExtJSTree()->getTreeNode: using equals if "+ rootNodeElement.getNodeText() + " == " + nodeName );
- if(rootNodeElement.getNodeText().equals(nodeName)){
- //verify if is the node that we are searching for
- if(searchPath.equals("")){
- resultTreeNode = rootNodeElement;
- }else{
- //continue searching nodes
- resultTreeNode = rootNodeElement.getTreeNode(searchPath, useRegularExpresion);
- }
- break;
- }
- }
- }
-
- if(resultTreeNode == null){
- throw new Exception("No treeNode found with the specified path.");
- }
-
- return resultTreeNode; */
- }
-
- public ExtJSTreeNode getTreeNode(String path) throws Exception {
- return getTreeNode(path, false);
- }
-
-/*
- public ExtJSTreeNode gotoNode(String path) throws Exception {
- return gotoNode(path, false);
- } */
-
- /**
- * Select the specified node in the tree from the root
- * @param path The path to the node, start with /rootNode/nodelevel1/nodelevel2 etc.
- * The complete path must be specified. Regular expressions are supported.
- * @return The found tree node
- */
- /*
- public ExtJSTreeNode gotoNode(String path, Boolean useRegularExpresion) throws Exception {
- String itemToSearch = null;
- List rootNodes = null;
- List filterNodes = null;
- ExtJSTreeNode rootNode = null;
- ExtJSTreeNode auxRootNode = null;
- ExtJSTreeNode resultWebElement = null;
- String searchPath = path;
-
- //search root nodes
- Logger.addLog("ExtJsTree-> Root tagname:" + this.root.getTagName());
- rootNodes = this.root.findElements(By.cssSelector(this.root.getTagName() + " > li.x-tree-node")); //style="" [style='']
-
- //search first node from left of path (root node)
- String nodeName = getLeftNodePath(searchPath);
- searchPath = removeLeftNodePath(searchPath);
-
- //list of nodes
- Logger.addLog("ExtJsTree->Number of root nodes found:" + rootNodes.size());
- Logger.addLog("ExtJsTree->Search root node:" + nodeName);
-
- //verify if list of nodes is available
- if(rootNodes == null){
- throw new Exception("ExtJsTree->No root nodes detected in tree structure.");
- }
-
- //x-tree-root-ct div.x-tree-root-node
- //search the root node in the path
- for(WebElement rootNodeElement:rootNodes){
- //check treenode text
- auxRootNode = new ExtJSTreeNode(rootNodeElement, this.driver);
- //
- Logger.addLog("ExtJsTree->search rootNode:" + auxRootNode.getNodeText());
-
- if(useRegularExpresion){
- if(auxRootNode.getNodeText().matches(nodeName)){
- rootNode = auxRootNode;
- break;
- }
- }else{
- if(auxRootNode.getNodeText().equals(nodeName)){
- rootNode = auxRootNode;
- break;
- }
- }
- }
-
- //verify if root node is available
- if(rootNode == null){
- throw new Exception("ExtJsTree->Root node not found.");
- }
-
- //search for child nodes?
- if(searchPath.trim().equals("")){
- //this is the search node
- return rootNode;
- }
-
- Logger.addLog("ExtJsTree-> Root node found:" + rootNode.getNodeText());
-
- resultWebElement = gotoNodeFromNode(rootNode, searchPath, useRegularExpresion);
-
- return resultWebElement;
- }
-
- public ExtJSTreeNode gotoNodeFromNode(ExtJSTreeNode currentNode, String path) throws Exception {
- return this.gotoNodeFromNode(currentNode, path, false);
- }
-
- */
- /**
- * Find the node from the specified node, the path must not include the current node
- * If the node is not found null is returned.
- * @param currentNode the current node, is an element with the class = "x-tree-node"
- * @param path path to the node, the current node must not be included.
- * @return
- */
- /*
- public ExtJSTreeNode gotoNodeFromNode(ExtJSTreeNode currentNode, String path, Boolean useRegularExpresion) throws Exception {
- ExtJSTreeNode rootNode = currentNode;
- //ExtJSTreeNode auxRootNode = null;
- String searchPath = path;
- Boolean nodeFound =false;
-
- //current path
- Logger.addLog("ExtJsTree->GotoNodeFromNode->current node Path:" + path);
-
- while(!searchPath.trim().equals("")){
- //verify if node is found in level
- nodeFound =false;
-
- //search in list of nodes
- //search first node from left of path (root node)
- String auxNodeName = getLeftNodePath(searchPath);
- searchPath = removeLeftNodePath(searchPath);
- Logger.addLog("ExtJsTree->GotoNodeFromNode->find node:" + auxNodeName);
-
- //count child nodes
- Logger.addLog("ExtJsTree->GotoNodeFromNode->child nodes:" + rootNode.getListChildNodes().size());
- for (ExtJSTreeNode childNode : rootNode.getListChildNodes()) {
-
- //check treenode text
- //auxRootNode = new ExtJSTreeNode(webElement);
- Logger.addLog("ExtJsTree->GotoNodeFromNode->search childNode:" + childNode.getNodeText());
- if(useRegularExpresion){
- if(childNode.getNodeText().matches(auxNodeName)){
- rootNode = childNode;
- nodeFound = true;
- break;
- }
- }else{
- if(childNode.getNodeText().equals(auxNodeName)){
- rootNode = childNode;
- nodeFound = true;
- break;
- }
- }
- };
- //continue with the next level in path
- if(nodeFound){
- //check if we are at the end of the path
- if(!searchPath.trim().equals("")){
- //continue searching the path
- //assign the new root node
- //the found node was assigned to rootNode
- } else
- {
- //the complete path was found
- break;
- }
- }else{
- //node not found, return error
- break;
- }
- }
- //the found node is rootNode
- if(nodeFound){
- //node found
- Logger.addLog("Node found:" + rootNode.getNodeText());
- return rootNode;
- }
- else{
- throw new Exception("ExtJsTree->Node not found.");
- }
- }*/
-
- public WebElement getRootNode(){
- return this.root;
- }
-
- public WebElement getCurrentNode(){
- return this.currentNode;
- }
- /*
- public String getLeftNodePath(String path){
- String workingPath = path;
-
- workingPath = removeSeparatorPath(workingPath);
-
- if(path.trim().equals("")){
- return "";
- }
-
- String[] splits = workingPath.split("/");
-
- //se trata de
- return splits[0];
- }
-
- public String removeLeftNodePath(String path){
- String workingPath = path;
-
- workingPath = removeSeparatorPath(workingPath);
-
- if(workingPath.trim().equals("")){
- return "";
- }
-
- int firstIndex = workingPath.indexOf("/");
-
- //there's no more nodes
- if(firstIndex == -1){
- return "";
- }
- //se trata de
- return workingPath.substring(firstIndex);
- }
-
- public String removeSeparatorPath(String path){
- String workingPath = path;
-
- if(path.trim().equals("")){
- return "";
- }
-
- //quitar el nodo root si existe
- if(workingPath.charAt(0) == '/'){
- workingPath = workingPath.substring(1);
- }
- //remove the last character
- if(workingPath.charAt(workingPath.length()-1) == '/'){
- workingPath = workingPath.substring(0, workingPath.length()-1);
- }
- //se trata de
- return workingPath;
- }*/
-}
diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSTreeNode.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSTreeNode.java
deleted file mode 100644
index cbb748661..000000000
--- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSTreeNode.java
+++ /dev/null
@@ -1,202 +0,0 @@
-package com.colosa.qa.automatization.common.extJs;
-
-import com.colosa.qa.automatization.common.Logger;
-import org.openqa.selenium.By;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.WebElement;
-import org.openqa.selenium.interactions.Actions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Created with IntelliJ IDEA.
- * User: herbert
- * Date: 5/7/13
- * Time: 2:07 PM
- * To change this template use File | Settings | File Templates.
- */
-public class ExtJSTreeNode {
- WebElement treeNode = null;
- private WebDriver driver;
- List childTreeNodes = null;
-
- /**
- * This class represent a tree node element, must be initialized -> class x-tree-node-el
- * @param treeNode element with class: x-tree-node-el
- * @param driver
- */
- public ExtJSTreeNode(WebElement treeNode, WebDriver driver){
- this.treeNode = treeNode;
- this.driver = driver;
-
- //search the child nodes of this node
- //childTreeNodes = findListChildNodes();
- }
-
- public String getNodeText(){
- WebElement node = this.treeNode.findElement(By.cssSelector("div.x-tree-node-el a.x-tree-node-anchor span"));
- return node.getText();
- }
-
- public void click(){
- WebElement node = this.treeNode.findElement(By.cssSelector("div.x-tree-node-el a.x-tree-node-anchor"));
- node.click();
- }
-
- public void doubleClick(){
- Actions action = new Actions(this.driver);
-
- WebElement node = this.treeNode.findElement(By.cssSelector("div.x-tree-node-el"));
- action.doubleClick(node);
- action.perform();
- }
-
- public int countChildNodes(){
- //List childList = this.treeNode.findElements(By.cssSelector("ul.x-tree-node-ct li.x-tree-node"));
- return childTreeNodes.size();
- }
-
- private List findListChildNodes(){
- List childList = this.treeNode.findElements(By.cssSelector(this.treeNode.getTagName() + " > ul.x-tree-node-ct li.x-tree-node:not([style='display: none;'])")); //style="display: none;"
-
- Logger.addLog("ExtJSTreeNode()->findListChildNodes: " + this.treeNode.getTagName() + " > ul.x-tree-node-ct li.x-tree-node:not([style='display: none;']) count:" + childList.size());
-
- List listTreeChildNodes = new ArrayList(childList.size());
-
- for (WebElement childNode : childList) {
- ExtJSTreeNode jsTreeNode = new ExtJSTreeNode(childNode, this.driver);
- Logger.addLog("ExtJSTreeNode()->findListChildNodes add node to list: " + jsTreeNode.getNodeText());
-
- listTreeChildNodes.add(jsTreeNode);
- }
- return listTreeChildNodes;
- }
-
- public List getListChildNodes(){
- return childTreeNodes;
- }
-
- /*public WebElement getWebElementNode(){
- return this.treeNode;
- }*/
-
- public ExtJSTreeNode getTreeNode(String nodePath, Boolean useRegularExpresion) throws Exception {
- //find child tree nodes
- this.childTreeNodes = findListChildNodes();
-
- return this.getTreeNodeInList(this.childTreeNodes, nodePath, useRegularExpresion);
- }
-
- /**
- * Get the tree node in base to search path starting from current search node
- * @param nodePath search path to find a node
- * @param useRegularExpresion true if regular expression is used in search path
- * @return
- * @throws Exception
- */
- public static ExtJSTreeNode getTreeNodeInList(List listTreeNodes, String nodePath, Boolean useRegularExpresion) throws Exception {
- ExtJSTreeNode resultTreeNode = null;
- String searchPath = nodePath;
-
- //search first node from left of path (root node)
- String nodeName = getLeftNodePath(searchPath);
- searchPath = removeLeftNodePath(searchPath);
-
- Logger.addLog("ExtJSTree()->getTreeNode: search node:" + nodeName + " pending path:" + searchPath );
-
- //search in child nodes
- for(ExtJSTreeNode treeNode:listTreeNodes){
-
- //check if is the same node
- if(useRegularExpresion){
- Logger.addLog("ExtJSTree()->getTreeNode: usign reg expresions if "+ treeNode.getNodeText() + " == " + nodeName );
- if(treeNode.getNodeText().matches(nodeName)){
- //verify if is the node that we are searching for
- if(searchPath.equals("")){
- //this is the search node
- resultTreeNode = treeNode;
- }else{
- //continue searching nodes
- resultTreeNode = treeNode.getTreeNode(searchPath, useRegularExpresion);
- }
- break;
- }
- }else{
- Logger.addLog("ExtJSTree()->getTreeNode: usign equals if "+ treeNode.getNodeText() + " == " + nodeName );
- if(treeNode.getNodeText().equals(nodeName)){
- //verify if is the node that we are searching for
- if(searchPath.equals("")){
- resultTreeNode = treeNode;
- }else{
- //continue searching nodes
- resultTreeNode = treeNode.getTreeNode(searchPath, useRegularExpresion);
- }
- break;
- }
- }
- }
-
- //if node null -> error
- if(resultTreeNode == null){
- throw new Exception("No treeNode found with the specified path.");
- }
-
- return resultTreeNode;
-
- }
-
- public static String getLeftNodePath(String path){
- String workingPath = path;
-
- workingPath = removeSeparatorPath(workingPath);
-
- if(path.trim().equals("")){
- return "";
- }
-
- String[] splits = workingPath.split("/");
-
- //se trata de
- return splits[0];
- }
-
- public static String removeLeftNodePath(String path){
- String workingPath = path;
-
- workingPath = removeSeparatorPath(workingPath);
-
- if(workingPath.trim().equals("")){
- return "";
- }
-
- int firstIndex = workingPath.indexOf("/");
-
- //there's no more nodes
- if(firstIndex == -1){
- return "";
- }
- //se trata de
- return workingPath.substring(firstIndex);
- }
-
- public static String removeSeparatorPath(String path){
- String workingPath = path;
-
- if(path.trim().equals("")){
- return "";
- }
-
- //quitar el nodo root si existe
- if(workingPath.charAt(0) == '/'){
- workingPath = workingPath.substring(1);
- }
- //remove the last character
- if(workingPath.charAt(workingPath.length()-1) == '/'){
- workingPath = workingPath.substring(0, workingPath.length()-1);
- }
- //se trata de
- return workingPath;
- }
-
-}
diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSWindow.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSWindow.java
deleted file mode 100644
index 04df0b7d0..000000000
--- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSWindow.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.colosa.qa.automatization.common.extJs;
-
-import com.colosa.qa.automatization.common.BrowserInstance;
-import com.colosa.qa.automatization.common.Logger;
-import org.openqa.selenium.By;
-import org.openqa.selenium.WebElement;
-
-import java.util.List;
-
-/**
- * Created with IntelliJ IDEA.
- * User: herbert
- * Date: 12/18/13
- * Time: 10:14 AM
- * To change this template use File | Settings | File Templates.
- */
-public class ExtJSWindow {
- private BrowserInstance browserInstance;
- private WebElement xWindow;
- private WebElement xWindowContent;
- List auxSearchList;
-
- public ExtJSWindow(BrowserInstance browserInstance) throws Exception {
- //search the first visible windows
- this.browserInstance = browserInstance;
-
- // findElement should not be used to look for non-present elements, use findElements(By) and assert zero length response instead.
- auxSearchList = browserInstance.getInstanceDriver().findElements(By.cssSelector("div.x-window")); //[style='visibility: visible']
- if(auxSearchList.size() > 0){
- //use the first x-toolbar found
- this.xWindow = auxSearchList.get(0);
- Logger.addLog("xWindow found div.x-window [style='visibility:visible']");
- }else
- {
- throw new Exception("xWindow not found in specified element.");
- }
-
- auxSearchList = this.xWindow.findElements(By.cssSelector("div.x-window-body"));
- if(auxSearchList.size() > 0){
- this.xWindowContent = auxSearchList.get(0);
- Logger.addLog("xWindow content found div.x-window-body");
- }else
- {
- throw new Exception("xWindow content not found in browser.");
- }
- }
-
- public WebElement getWindowElement(){
- return this.xWindow;
- }
-}
diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSWindowToolbar.java b/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSWindowToolbar.java
deleted file mode 100644
index 36689be92..000000000
--- a/tests/functional/src/main/java/com/colosa/qa/automatization/common/extJs/ExtJSWindowToolbar.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package com.colosa.qa.automatization.common.extJs;
-
-import com.colosa.qa.automatization.common.BrowserInstance;
-import com.colosa.qa.automatization.common.Logger;
-import org.openqa.selenium.By;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.WebElement;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Represents a x windows Toolbar.
- * User: herbert
- * Date: 10/4/13
- * Time: 11:01 AM
- * To change this template use File | Settings | File Templates.
- */
-public class ExtJSWindowToolbar {
- private BrowserInstance browserInstance;
- private WebElement toolbar;
- private WebElement toolbarContent;
- private List listExtJSToolbarCells;
-
- /**
- * Represents a ExtJs Window Toolbar
- * @param toolbar element with class x-window-tbar
- * @param browserInstance
- */
- public ExtJSWindowToolbar(WebElement toolbar, BrowserInstance browserInstance){
- this.browserInstance = browserInstance;
- this.toolbar = toolbar;
-
- String classAttribute = toolbar.getAttribute("class");
- if(classAttribute.contains("x-window-tbar")){
- //this is the toolbar element
- Logger.addLog("The passed element is the same toolbar: x-window-tbar");
- this.toolbar = toolbar;
- }else{
- //search for the toolbar element
- //Logger.addLog("before Toolbar find x-panel-tbar");
- this.toolbar = toolbar.findElement(By.className("x-window-tbar"));
- Logger.addLog("Toolbar found x-window-tbar");
- }
-
- //Logger.addLog("before Toolbar find x-toolbar-ct");
- //this.toolbarContent = this.toolbar.findElement(By.className("x-toolbar-ct"));
- //Logger.addLog("Toolbar content found x-toolbar-ct");
-
- this.listExtJSToolbarCells = queryListToolbarCells();
- }
-
- private List queryListToolbarCells(){
-
- //List listCells = this.toolbarContent.findElements(By.cssSelector("td.x-toolbar-cell"));
- List listCells = this.toolbar.findElements(By.cssSelector("td.x-toolbar-cell"));
- Logger.addLog("Found current list of cells: " + listCells.size());
-
- List listToolbarCells = new ArrayList(listCells.size());
-
- for (WebElement toolbarCell : listCells) {
- Logger.addLog(" create toolbar cell data.");
-
- listToolbarCells.add(new ExtJSToolbarCell(toolbarCell, this.browserInstance));
-
- Logger.addLog(" cell data: " + toolbarCell.getTagName() + ":" + toolbarCell.getText());
- }
-
- return listToolbarCells;
- }
-
- public ExtJSToolbarCell findToolbarCell(String buttonText){
- ExtJSToolbarCell resultToolbarCell = null;
-
- for (ExtJSToolbarCell extjsToolbarCell : this.listExtJSToolbarCells) {
- //Logger.addLog(" toolbar cell:" + extjsToolbarCell.getCellText() + " vs " + buttonText);
-
- if(extjsToolbarCell.getCellText().trim().equals(buttonText)){
- Logger.addLog(" toolbar cell found:" + extjsToolbarCell.getCellText());
- resultToolbarCell = extjsToolbarCell;
- break;
- }
- }
-
- return resultToolbarCell;
- }
-
- public ExtJSToolbarCell findToolbarCell(int cellIndex){
- ExtJSToolbarCell resultToolbarCell = this.listExtJSToolbarCells.get(cellIndex);
- return resultToolbarCell;
- }
-
-
-}
diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/pages/Page.java b/tests/functional/src/main/java/com/colosa/qa/automatization/pages/Page.java
deleted file mode 100644
index edb4f736d..000000000
--- a/tests/functional/src/main/java/com/colosa/qa/automatization/pages/Page.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.colosa.qa.automatization.pages;
-
-import com.colosa.qa.automatization.common.BrowserInstance;
-import com.colosa.qa.automatization.common.ConfigurationSettings;
-
-public abstract class Page{
- protected String url;
- protected String pageTitle;
- protected BrowserInstance browser;
- protected Integer implicitWaitSeconds = 0;
-
- public Page(BrowserInstance browser) throws Exception {
- this.browser = browser;
-
- //init implicit wait time
- implicitWaitSeconds = Integer.parseInt(ConfigurationSettings.getInstance().getSetting("implicit.wait.seconds"));
- browser.setImplicitWait(implicitWaitSeconds);
-
- url = "";
- pageTitle = "";
- //Logger.addLog("Page contructor....:" + url);
- }
-
- /**
- * Go to default URL server
- */
- public void gotoUrl(String url){
- this.url = url;
- //Logger.addLog("Page.Goto url:" + url);
- this.browser.gotoUrl(url);
- //Logger.addLog("Browser.goto url:" + url);
- }
-
- public boolean isAt(){
- return (this.browser.title() == pageTitle);
- }
-
- public abstract void verifyPage() throws Exception;
-}
\ No newline at end of file
diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/pages/Pages.java b/tests/functional/src/main/java/com/colosa/qa/automatization/pages/Pages.java
deleted file mode 100644
index 706340024..000000000
--- a/tests/functional/src/main/java/com/colosa/qa/automatization/pages/Pages.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.colosa.qa.automatization.pages;
-
-import com.colosa.qa.automatization.common.BrowserInstance;
-import com.colosa.qa.automatization.common.ConfigurationSettings;
-
-import java.io.IOException;
-
-public class Pages{
- protected BrowserInstance _browserInstance;
-
- public Pages(BrowserInstance browserInstance){
- _browserInstance = browserInstance;
- }
-
- public void gotoDefaultUrl() throws IOException {
- String url;
- //default url
- url = ConfigurationSettings.getInstance().getSetting("server.url");
-
- _browserInstance.gotoUrl(url);
- }
-
- /*
- public Login Login() throws Exception{
-
- Login loginPage = new Login(_browserInstance);
-
- return loginPage;
- }
-
- public Main Main() throws Exception{
-
- Main mainPage = new Main(_browserInstance);
-
- return mainPage;
- }
- */
-
-
-}
\ No newline at end of file
diff --git a/tests/functional/src/main/java/com/colosa/qa/automatization/tests/common/Test.java b/tests/functional/src/main/java/com/colosa/qa/automatization/tests/common/Test.java
deleted file mode 100644
index 748b01f6f..000000000
--- a/tests/functional/src/main/java/com/colosa/qa/automatization/tests/common/Test.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package com.colosa.qa.automatization.tests.common;
-
-import com.colosa.qa.automatization.common.BrowserSettings;
-import com.colosa.qa.automatization.common.BrowserInstance;
-import com.colosa.qa.automatization.common.ConfigurationSettings;
-import com.colosa.qa.automatization.common.Logger;
-import com.colosa.qa.automatization.pages.Pages;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
-import org.junit.After;
-import org.junit.runners.Suite;
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Collection;
-
-/**
- * Created with IntelliJ IDEA.
- * User: Herbert Saal
- * Date: 3/28/13
- * Time: 11:58 AM
- * To change this template use File | Settings | File Templates.
- */
-@RunWith(value = Parameterized.class)
-public abstract class Test {
- protected String browserName;
- protected BrowserInstance browserInstance;
- protected Pages pages;
-
- /*public Test() throws IOException {
-
- String browserName = "firefox";
-
- this.browserName = browserName;
- Logger.addLog("Test with browser:" + browserName);
- //initialize test pages
- initializeTest(browserName);
- //initialize pages
- pages = new Pages(browserInstance);
- } */
-
- public Test(String browserName) throws IOException {
-
- this.browserName = browserName;
- Logger.addLog("Test with browser:" + browserName);
- //initialize test pages
- initializeTest(browserName);
- //initialize pages
- pages = new Pages(browserInstance);
- }
-
- @Parameters
- public static Collection