aspose file tools*
The moose likes Beginning Java and the fly likes jemmy automation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "jemmy automation" Watch "jemmy automation" New topic
Author

jemmy automation

pras
Ranch Hand

Joined: Apr 04, 2007
Posts: 188
package ecctest.console.smi;

import ecctest.console.AbstractConsoleTestCase;
import org.netbeans.jemmy.operators.*;
import java.util.ResourceBundle;
import java.util.Properties;
import java.io.FileInputStream;

/**
* Created by IntelliJ IDEA.
* User: tippim
* Date: Aug 29, 2006
* Time: 2:26:47 AM
* To change this template use File | Settings | File Templates.
*/
public class TestSystemDialog extends AbstractConsoleTestCase {

private JFrameOperator _testConsole=null;
private JDialogOperator systemDetails = null;

public TestSystemDialog()
{

}

public void testTreeItems()
{
try{
String sql="select hostid from host";
// start the application and login
startApplication();
_testConsole=logIn();

// get the tree
JTreeOperator tree=new JTreeOperator(_testConsole);

// check that the tree is not empty
int numNodes=tree.getChildCount(tree.getRoot());
assertTrue("There should be at least one node in tree",numNodes>0);

// select hosts from the tree.
String treeNode="Hosts";
tree.clickOnPath(tree.findPath(treeNode));

// expand and select the hosts branch of the tree
tree.expandPath(tree.findPath(treeNode));
tree.selectPath(tree.findPath(treeNode));
//pause so tht we can get the data from the database and render it.
tree.getQueueTool().waitEmpty(5000);


tree.selectPath(tree.findPath("Hosts|Windows Hosts|INENRAPOLSL1C","|"));
tree.expandPath(tree.findPath("Hosts|Windows Hosts|INENRAPOLSL1C","|"));
tree.clickOnPath(tree.findPath("Hosts|Windows Hosts|INENRAPOLSL1C"));

tree.callPopupOnPath(tree.findPath("Hosts|Windows Hosts|INENRAPOLSL1C"));
JPopupMenuOperator popup = new JPopupMenuOperator();
popup.pushMenuNoBlock("Host|Show System Details...","|");


JDialogOperator systemDetails = new JDialogOperator(_testConsole, "System Details");

systemDetails.getQueueTool().waitEmpty(1000);

assertNotNull("system details for host......",systemDetails);

//systemDetails.close();
JButtonOperator okButt = new JButtonOperator(systemDetails,"Close");
okButt.pushNoBlock();
//systemDetails.getQueueTool().waitEmpty(1000);
}
catch(Exception e) {
e.printStackTrace();
}
}

}



i want to generalize the code.

instead of finding a single window machine in path, i want to generalize it with any windows machine?
what code to change??

pras
Ranch Hand

Joined: Apr 04, 2007
Posts: 188
i want the code in general.

not for a particular host
pras
Ranch Hand

Joined: Apr 04, 2007
Posts: 188
has anyone worked on jemmy package here


am going
pras
Ranch Hand

Joined: Apr 04, 2007
Posts: 188
hello guys?. anyone worked on jemmy automation?
pras
Ranch Hand

Joined: Apr 04, 2007
Posts: 188
nobody worked on jemmy?
 
Don't get me started about those stupid light bulbs.
 
subject: jemmy automation