Java Code Examples for org.netbeans.jemmy.operators.JTabbedPaneOperator#setSelectedIndex()
The following examples show how to use
org.netbeans.jemmy.operators.JTabbedPaneOperator#setSelectedIndex() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Autoupdate.java From netbeans with Apache License 2.0 | 6 votes |
public void CheckUpdated( ) { startTest( ); // Open new JMenuBarOperator(MainWindowOperator.getDefault()).pushMenuNoBlock("Tools|Plugins"); JDialogOperator jdPlugins = new JDialogOperator( "Plugins" ); JTabbedPaneOperator jtTabs = new JTabbedPaneOperator( jdPlugins, 0 ); jtTabs.setSelectedIndex( jtTabs.findPage( "Updated" ) ); // Close by button JButtonOperator jbClose = new JButtonOperator( jdPlugins, "Close" ); jbClose.push( ); jdPlugins.waitClosed( ); endTest( ); }
Example 2
Source File: Autoupdate.java From netbeans with Apache License 2.0 | 5 votes |
public void CheckDownloaded( ) { startTest( ); // Open new JMenuBarOperator(MainWindowOperator.getDefault()).pushMenuNoBlock("Tools|Plugins"); JDialogOperator jdPlugins = new JDialogOperator( "Plugins" ); JTabbedPaneOperator jtTabs = new JTabbedPaneOperator( jdPlugins, 0 ); jtTabs.setSelectedIndex( jtTabs.findPage( "Downloaded" ) ); // Check buttons JButtonOperator jbAdd = new JButtonOperator( jdPlugins, "Add Plugins..." ); JButtonOperator jbInstall = new JButtonOperator( jdPlugins, "Install" ); // Check table JTableOperator jtTable = new JTableOperator( jdPlugins, 0 ); int iOriginalRows = jtTable.getRowCount( ); // Close by button JButtonOperator jbClose = new JButtonOperator( jdPlugins, "Close" ); jbClose.push( ); jdPlugins.waitClosed( ); endTest( ); }
Example 3
Source File: Autoupdate.java From netbeans with Apache License 2.0 | 4 votes |
public void CheckInstalled( ) { startTest( ); // Open new JMenuBarOperator(MainWindowOperator.getDefault()).pushMenuNoBlock("Tools|Plugins"); JDialogOperator jdPlugins = new JDialogOperator( "Plugins" ); JTabbedPaneOperator jtTabs = new JTabbedPaneOperator( jdPlugins, 0 ); jtTabs.setSelectedIndex( jtTabs.findPage( "Installed" ) ); // HERE THE TESTS // Click reload and wait results JButtonOperator jbReload = new JButtonOperator( jdPlugins, "Reload Catalog" ); jbReload.push( ); Sleep( 5000 ); boolean bRedo = true; int iCount = 0; while( bRedo ) { try { Sleep( 1000 ); new JLabelOperator( jdPlugins, "Checking for updates in " ); if( 60 <= ++iCount ) fail( "Reloading is too long." ); } catch( JemmyException ex ) { bRedo = false; } } // Check buttons JButtonOperator jbUninstall = new JButtonOperator( jdPlugins, "Uninstall" ); // Check table JTableOperator jtTable = new JTableOperator( jdPlugins, 0 ); int iOriginalRows = jtTable.getRowCount( ); for( int i = 0; i < 10; i++ ) { // Check uninstall disabled if( jbUninstall.isEnabled( ) ) fail( "Uninstall button enabled without selection." ); // Click first column jtTable.clickOnCell( i, 0 ); // Check uninstall enabled if( !jbUninstall.isEnabled( ) ) fail( "Uninstall button disabled with selection." ); // Check // ToDo // Click first column jtTable.clickOnCell( i, 0 ); // Check uninstall disabled if( jbUninstall.isEnabled( ) ) fail( "Uninstall button enabled without selection." ); } // Close by button JButtonOperator jbClose = new JButtonOperator( jdPlugins, "Close" ); jbClose.push( ); jdPlugins.waitClosed( ); endTest( ); }
Example 4
Source File: Autoupdate.java From netbeans with Apache License 2.0 | 4 votes |
public void CheckAvailablePlugins( ) { startTest( ); // Open new JMenuBarOperator(MainWindowOperator.getDefault()).pushMenuNoBlock("Tools|Plugins"); JDialogOperator jdPlugins = new JDialogOperator( "Plugins" ); JTabbedPaneOperator jtTabs = new JTabbedPaneOperator( jdPlugins, 0 ); jtTabs.setSelectedIndex( jtTabs.findPage( "Available Plugins" ) ); Sleep( 1000 ); // Check buttons JButtonOperator jbReload = new JButtonOperator( jdPlugins, "Reload Catalog" ); JButtonOperator jbInstall = new JButtonOperator( jdPlugins, "Install" ); // Check table JTableOperator jtTable = new JTableOperator( jdPlugins, 0 ); int iOriginalRows = jtTable.getRowCount( ); for( int i = 0; i < iOriginalRows; i++ ) { // Check install disabled if( jbInstall.isEnabled( ) ) fail( "Install button enabled without selection." ); // Click first column jtTable.clickOnCell( i, 0 ); // Check install enabled if( !jbInstall.isEnabled( ) ) fail( "Install button disabled with selection." ); // Check // ToDo // Click first column jtTable.clickOnCell( i, 0 ); // Check install disabled if( jbInstall.isEnabled( ) ) fail( "Install button enabled without selection." ); } // Close by button JButtonOperator jbClose = new JButtonOperator( jdPlugins, "Close" ); jbClose.push( ); jdPlugins.waitClosed( ); endTest( ); }