Author: hansbak
Date: Sun Apr 10 07:20:27 2011 New Revision: 1090744 URL: http://svn.apache.org/viewvc?rev=1090744&view=rev Log: add timeout to selenium tests Modified: ofbiz/trunk/framework/testtools/config/seleniumXml.properties ofbiz/trunk/framework/testtools/runSeleniumXml.sh ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java Modified: ofbiz/trunk/framework/testtools/config/seleniumXml.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/config/seleniumXml.properties?rev=1090744&r1=1090743&r2=1090744&view=diff ============================================================================== --- ofbiz/trunk/framework/testtools/config/seleniumXml.properties (original) +++ ofbiz/trunk/framework/testtools/config/seleniumXml.properties Sun Apr 10 07:20:27 2011 @@ -24,6 +24,7 @@ proxyPort=4444 #browser=*firefox browser=*firefox /usr/lib/firefox-3.0.8/firefox startUrl=http://localhost:8080/ +timeout=60000 log4jFile=./config/log4j.properties # --- Allow to use Selenium in Webtools with or without Internet access Modified: ofbiz/trunk/framework/testtools/runSeleniumXml.sh URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/runSeleniumXml.sh?rev=1090744&r1=1090743&r2=1090744&view=diff ============================================================================== --- ofbiz/trunk/framework/testtools/runSeleniumXml.sh (original) +++ ofbiz/trunk/framework/testtools/runSeleniumXml.sh Sun Apr 10 07:20:27 2011 @@ -27,7 +27,7 @@ export CP=$CP:$OFBIZ_HOME/framework/base export CP=$CP:$OFBIZ_HOME/framework/base/lib/junit.jar export CP=$CP:$OFBIZ_HOME/framework/base/lib/commons/commons-lang-2.3.jar export CP=$CP:$OFBIZ_HOME/framework/base/lib/log4j-1.2.15.jar -export CP=$CP:$OFBIZ_HOME/framework/base/lib/javolution-5.2.3.jar +export CP=$CP:$OFBIZ_HOME/framework/base/lib/javolution-5.4.3.jar export CP=$CP:$OFBIZ_HOME/framework/base/build/lib/ofbiz-base.jar echo $CP Modified: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java?rev=1090744&r1=1090743&r2=1090744&view=diff ============================================================================== --- ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java (original) +++ ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java Sun Apr 10 07:20:27 2011 @@ -973,6 +973,7 @@ public class SeleniumXml { String serverPort = null; String browser = null; String startUrl = null; + String timeout = null; //First initialize with property values if(props != null ) { //Get setup params from property value @@ -980,6 +981,7 @@ public class SeleniumXml { serverPort = props.getProperty("proxyPort", "4444"); browser = props.getProperty("browser", "*iexplore"); startUrl = props.getProperty("startUrl", "http://localhost:8080"); + timeout = props.getProperty("timeout", "30000"); imagePath = props.getProperty("imagePath", "runtime/logs/"); } //Second over ride properties if defined in the "setup" element @@ -1003,9 +1005,11 @@ public class SeleniumXml { logger.info("setup: serverPort=" + serverPort); logger.info("setup: browser=" + browser); logger.info("setup: startUrl=" + startUrl); + logger.info("setup: timeout=" + timeout); logger.info("setup: imagePath=" + imagePath); this.sel = new DefaultSelenium(serverHost, Integer.parseInt(serverPort), browser, startUrl); this.sel.start(); + this.sel.setTimeout(timeout); } private String getAbsolutePath(String fileName){ |
Free forum by Nabble | Edit this page |