本文整理汇总了Java中org.netbeans.jemmy.operators.JTreeOperator.selectPath方法的典型用法代码示例。如果您正苦于以下问题:Java JTreeOperator.selectPath方法的具体用法?Java JTreeOperator.selectPath怎么用?Java JTreeOperator.selectPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.jemmy.operators.JTreeOperator
的用法示例。
在下文中一共展示了JTreeOperator.selectPath方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testAddLibrary
import org.netbeans.jemmy.operators.JTreeOperator; //导入方法依赖的package包/类
public void testAddLibrary() {
// useless method while executing this test internally
// but there is a missing library while executing this test on external IDE
ProjectRootNode prn = new ProjectsTabOperator().getProjectRootNode(TEST_PROJECT_NAME);
Node libNode = new Node(prn, "Test Libraries");
new ActionNoBlock(null,"Add Library").perform(libNode);
NbDialogOperator libDialog = new NbDialogOperator("Add Library");
JTreeOperator treeOp = new JTreeOperator(libDialog);
TreePath tp = treeOp.findPath("Global Libraries|Junit");
treeOp.selectPath(tp);
new JButtonOperator(libDialog, "Add Library").push();
}
示例2: testAddLibrary
import org.netbeans.jemmy.operators.JTreeOperator; //导入方法依赖的package包/类
public void testAddLibrary() {
// useless method while executing this test internally
// but there is a missing libraty while executing this test on external IDE
ProjectRootNode prn = new ProjectsTabOperator().getProjectRootNode(TEST_PROJECT_NAME);
Node libNode = new Node(prn, "Test Libraries");
new ActionNoBlock(null,"Add Library").perform(libNode);
NbDialogOperator libDialog = new NbDialogOperator("Add Library");
JTreeOperator treeOp = new JTreeOperator(libDialog);
TreePath tp = treeOp.findPath("Global Libraries|Junit");
treeOp.selectPath(tp);
new JButtonOperator(libDialog, "Add Library").push();
}
示例3: addApplicationServer
import org.netbeans.jemmy.operators.JTreeOperator; //导入方法依赖的package包/类
public void addApplicationServer() {
// FIXME: Make a call of the following method
// Utilities.addApplicationServer();
String appServerPath = System.getProperty("com.sun.aas.installRoot");
if (appServerPath == null) {
throw new Error("Can't add application server. com.sun.aas.installRoot property is not set.");
}
String addServerMenuItem = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.actions.Bundle", "LBL_Add_Server_Instance"); // Add Server...
String addServerInstanceDialogTitle = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.wizard.Bundle", "LBL_ASIW_Title"); //"Add Server Instance"
String glassFishV2ListItem = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.sun.ide.Bundle", "LBL_GlassFishV2");
String nextButtonCaption = Bundle.getStringTrimmed("org.openide.Bundle", "CTL_NEXT");
String finishButtonCaption = Bundle.getStringTrimmed("org.openide.Bundle", "CTL_FINISH");
RuntimeTabOperator rto = RuntimeTabOperator.invoke();
JTreeOperator runtimeTree = rto.tree();
long oldTimeout = runtimeTree.getTimeouts().getTimeout("JTreeOperator.WaitNextNodeTimeout");
runtimeTree.getTimeouts().setTimeout("JTreeOperator.WaitNextNodeTimeout", 60000);
TreePath path = runtimeTree.findPath("Servers");
runtimeTree.selectPath(path);
new JPopupMenuOperator(runtimeTree.callPopupOnPath(path)).pushMenuNoBlock(addServerMenuItem);
NbDialogOperator addServerInstanceDialog = new NbDialogOperator(addServerInstanceDialogTitle);
new JListOperator(addServerInstanceDialog, 1).selectItem(glassFishV2ListItem);
new JButtonOperator(addServerInstanceDialog,nextButtonCaption).push();
new JTextFieldOperator(addServerInstanceDialog).enterText(appServerPath);
new JButtonOperator(addServerInstanceDialog,finishButtonCaption).push();
runtimeTree.getTimeouts().setTimeout("JTreeOperator.WaitNextNodeTimeout", oldTimeout);
}
示例4: AddItInternal
import org.netbeans.jemmy.operators.JTreeOperator; //导入方法依赖的package包/类
protected void AddItInternal(
int iColumn,
String sItName,
String sMenuToAdd,
String sRadioName,
String sTypePath,
String sAddedName
)
{
// Swicth to Schema view
new JMenuBarOperator(MainWindowOperator.getDefault()).pushMenu("View|Editors|Schema");
// Select first column, Attributes
SchemaMultiView opMultiView = new SchemaMultiView( JAXB_PACKAGE_NAME + ".xsd" );
opMultiView.switchToSchema( );
opMultiView.switchToSchemaColumns( );
JListOperator opList = opMultiView.getColumnListOperator( iColumn );
opList.selectItem( sItName );
// Right click on Reference Schemas
int iIndex = opList.findItemIndex( sItName );
Point pt = opList.getClickPoint( iIndex );
opList.clickForPopup( pt.x, pt.y );
// Click Add Attribute...
JPopupMenuOperator popup = new JPopupMenuOperator( );
popup.pushMenuNoBlock( sMenuToAdd + "..." );
// Get dialog
JDialogOperator jadd = new JDialogOperator( sMenuToAdd.replace( "|", " " ) );
// Set unique name
JTextFieldOperator txt = new JTextFieldOperator( jadd, 0 );
txt.setText( sAddedName );
// Use existing definition
if( null != sRadioName )
{
JRadioButtonOperator jex = new JRadioButtonOperator( jadd, sRadioName );
jex.setSelected( true );
}
// Get tree
if( null != sTypePath )
{
JTreeOperator jtree = new JTreeOperator( jadd, 0 );
TreePath path = jtree.findPath( sTypePath );
jtree.selectPath( path );
jtree.clickOnPath( path );
}
// Close
JButtonOperator jOK = new JButtonOperator( jadd, "OK" ); // TODO : OK
jOK.push( );
jadd.waitClosed( );
// Check attribute was added successfully
opList = opMultiView.getColumnListOperator( iColumn + 1 );
iIndex = opList.findItemIndex( sAddedName );
if( -1 == iIndex )
fail( "It was not added." );
}
示例5: selectNode
import org.netbeans.jemmy.operators.JTreeOperator; //导入方法依赖的package包/类
public void selectNode(String nodeName) {
JTreeOperator tree = getTreeOperator();
tree.selectPath(BeansTestCase.getTreePath(tree, nodeName, defaultConverter));
}