You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by mc...@apache.org on 2008/08/14 16:25:50 UTC
svn commit: r685915 - in
/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium:
EclipseBrowserLauncher.java EclipseSelenium.java
Author: mcconne
Date: Thu Aug 14 07:25:48 2008
New Revision: 685915
URL: http://svn.apache.org/viewvc?rev=685915&view=rev
Log:
GERONIMODEVTOOLS-480 Selenium updates for the testsuite
Added:
geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseBrowserLauncher.java (with props)
geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSelenium.java (with props)
Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseBrowserLauncher.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseBrowserLauncher.java?rev=685915&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseBrowserLauncher.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseBrowserLauncher.java Thu Aug 14 07:25:48 2008
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.geronimo.testsuite.common.selenium;
+
+import org.apache.geronimo.testsuite.common.ui.AbbotHelper;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.widgets.Shell;
+import org.openqa.selenium.server.browserlaunchers.AbstractBrowserLauncher;
+
+/**
+ * EclipseBrowserLauncher
+ *
+ * @version $Rev$ $Date$
+ */
+public class EclipseBrowserLauncher extends AbstractBrowserLauncher {
+
+ public EclipseBrowserLauncher(int a, String sessionId) {
+ super(sessionId);
+ }
+
+ @Override
+ protected void launch(String url) {
+ try {
+
+ AbbotHelper aHelper = EclipseSeleniumServer.INSTANCE.getAHelper();
+ Shell shell = EclipseSeleniumServer.INSTANCE.getShell();
+
+ aHelper.clickMenuItem (shell,
+ new String[] {"&Window", "Web Browser", "&0 Internal Web Browser"});
+ Shell openShell = aHelper.clickMenuItem (shell,
+ new String[] {"&Window", "Show &View", "&Other..."}, "Show View");
+ aHelper.clickTreeItem (openShell,
+ new String[] {"General", "Internal Web Browser"});
+ aHelper.clickButton (openShell, IDialogConstants.OK_LABEL);
+
+ aHelper.setCombo (shell, url);
+ aHelper.clickToolItem (shell, "Go to the selected URL");
+ aHelper.waitTime (15000);
+
+ } catch ( Exception e ) {
+ e.printStackTrace();
+ }
+ }
+
+ public void close() {
+ }
+
+ public Process getProcess() {
+ return null;
+ }
+
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseBrowserLauncher.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseBrowserLauncher.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseBrowserLauncher.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSelenium.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSelenium.java?rev=685915&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSelenium.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSelenium.java Thu Aug 14 07:25:48 2008
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.geronimo.testsuite.common.selenium;
+
+import org.apache.geronimo.testsuite.common.ui.AbbotHelper;
+import org.eclipse.swt.widgets.Shell;
+
+import com.thoughtworks.selenium.DefaultSelenium;
+import com.thoughtworks.selenium.Selenium;
+
+/**
+ * EclipseSelenium
+ *
+ * @version $Rev$ $Date$
+ */
+public class EclipseSelenium extends DefaultSelenium {
+
+ private static String serverHost = "localhost";
+ private static int serverPort = 4444;
+ private static String browserStartCommand = "*EclipseBrowser";
+ private static String browserURL = "http://localhost:4444";
+
+ public EclipseSelenium() {
+ super(serverHost, serverPort, browserStartCommand, browserURL);
+ }
+
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSelenium.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSelenium.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSelenium.java
------------------------------------------------------------------------------
svn:mime-type = text/plain