• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jemmy automation

 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i want the code in general.

not for a particular host
 
pras
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
has anyone worked on jemmy package here


am going
 
pras
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello guys?. anyone worked on jemmy automation?
 
pras
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nobody worked on jemmy?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic