Author: ldimaggio
Date: 2012-09-10 15:02:15 -0400 (Mon, 10 Sep 2012)
New Revision: 43566
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldFileAction.java
Log:
Added try/catch block to String.replaceAll - dealing with Windows dirnames such as:
C:\hudson\workspace\esb.bot.tests.ldimaggi-windows-debug\sources\tests\org.jboss.tools.esb.ui.bot.test\target\work\data\helloworld_file_action
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldFileAction.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldFileAction.java 2012-09-10
18:29:15 UTC (rev 43565)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldFileAction.java 2012-09-10
19:02:15 UTC (rev 43566)
@@ -65,6 +65,8 @@
SWTBotTreeItem theProject = bot.tree(0).getTreeItem(projectName).select();
bot.menu("File").menu("Properties").click();
+ bot.sleep(60000l);
+
if (System.getProperty("file.separator").equals("/")) {
baseDir = bot.textWithLabel("Location:").getText() +
System.getProperty("file.separator");
}
@@ -73,7 +75,15 @@
//baseDir =
bot.textWithLabel("Location:").getText().replaceAll(System.getProperty("file.separator"),
System.getProperty("file.separator") +
System.getProperty("file.separator")) +
System.getProperty("file.separator");
baseDir = bot.textWithLabel("Location:").getText();
System.out.println("DEBUG baseDir = " +
bot.textWithLabel("Location:").getText()) ;
- baseDir =
bot.textWithLabel("Location:").getText().replaceAll(System.getProperty("file.separator"),
"zzz");
+
+ try {
+ baseDir =
bot.textWithLabel("Location:").getText().replaceAll(System.getProperty("file.separator"),
"zzz");
+ }
+ catch (Exception E) {
+ System.out.println ("replaceAll failing with " + E.getMessage() );
+ }
+
+
}
// if (System.getProperty("file.separator").equals("/")) {
// baseDir = bot.textWithLabel("Location:").getText() +
System.getProperty("file.separator");
Show replies by date