Author: jjankovi
Date: 2012-03-20 10:31:13 -0400 (Tue, 20 Mar 2012)
New Revision: 39656
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/OpenOnHelper.java
Log:
Modify openOnByOption method to return if openon option was found
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/OpenOnHelper.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/OpenOnHelper.java 2012-03-20
13:12:32 UTC (rev 39655)
+++
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/OpenOnHelper.java 2012-03-20
14:31:13 UTC (rev 39656)
@@ -30,19 +30,24 @@
* @param titleName
* @param chosenOption
*/
- public void openOnByOption(String openOnString, String titleName, String chosenOption)
{
+ public boolean openOnByOption(String openOnString, String titleName, String
chosenOption) {
selectTextForOpenOn(openOnString, titleName);
bot.menu(CDIConstants.NAVIGATE).menu(CDIConstants.OPEN_HYPERLINK).click();
bot.sleep(Timing.time500MS());
SWTBotTable table = bot.activeShell().bot().table(0);
+
+ boolean optionFound = false;
+
for (int i = 0; i < table.rowCount(); i++) {
if (table.getTableItem(i).getText().contains(chosenOption)) {
+ optionFound = true;
table.click(i, 0);
break;
}
}
bot.sleep(Timing.time1S());
- setEd(bot.activeEditor().toTextEditor());
+ setEd(bot.activeEditor().toTextEditor());
+ return optionFound;
}
/**
Show replies by date