svn commit r43917 - trunk/commons/qa/web-test-framework/mashup/src/test/java/org/wso2/carbon/web/test/mashup

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit r43917 - trunk/commons/qa/web-test-framework/mashup/src/test/java/org/wso2/carbon/web/test/mashup

Yumani Ranaweera
Author: yumani
Date: Thu Aug 20 23:42:25 2009
New Revision: 43917
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=43917

Log:
updated to use the properties file.

Modified:
   trunk/commons/qa/web-test-framework/mashup/src/test/java/org/wso2/carbon/web/test/mashup/BrowserInitializer.java

Modified: trunk/commons/qa/web-test-framework/mashup/src/test/java/org/wso2/carbon/web/test/mashup/BrowserInitializer.java
URL: http://wso2.org/svn/browse/wso2/trunk/commons/qa/web-test-framework/mashup/src/test/java/org/wso2/carbon/web/test/mashup/BrowserInitializer.java?rev=43917&r1=43916&r2=43917&view=diff
==============================================================================
--- trunk/commons/qa/web-test-framework/mashup/src/test/java/org/wso2/carbon/web/test/mashup/BrowserInitializer.java (original)
+++ trunk/commons/qa/web-test-framework/mashup/src/test/java/org/wso2/carbon/web/test/mashup/BrowserInitializer.java Thu Aug 20 23:42:25 2009
@@ -3,6 +3,10 @@
 import com.thoughtworks.selenium.Selenium;
 import com.thoughtworks.selenium.DefaultSelenium;
 
+import java.util.Properties;
+import java.io.IOException;
+import java.io.FileInputStream;
+import java.io.File;
 
 
 public class BrowserInitializer {
@@ -20,10 +24,16 @@
         selenium.stop();
     }
 
-    public synchronized static void initbrowser() {
+     public static Properties loadProperties() throws IOException {
+        Properties properties = new Properties();
+        properties.load(new FileInputStream(".." + File.separator + "commons" + File.separator + "src" + File.separator + "test" + File.separator + "resources" + File.separator + "framework.properties"));
+        return properties;
+    }
+
+    public synchronized static void initbrowser() throws IOException {
 
         if (selenium == null) {
-            selenium = new DefaultSelenium("localhost", 4444, "*iexplore", "https://localhost:9443");
+            selenium = new DefaultSelenium("localhost", 4444, "*firefox", "https://" + loadProperties().getProperty("host.name") + ":" + loadProperties().getProperty("https.port"));
             selenium.start();
 
             //    selenium.open("/carbon/admin/login.jsp");

_______________________________________________
Commons-dev mailing list
[hidden email]
https://wso2.org/cgi-bin/mailman/listinfo/commons-dev