Revision: 815
          http://jwebunit.svn.sourceforge.net/jwebunit/?rev=815&view=rev
Author:   jevonwright
Date:     2009-11-30 06:34:35 +0000 (Mon, 30 Nov 2009)

Log Message:
-----------
issue 2697234: Make HtmlUnit objects accessible

Modified Paths:
--------------
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java
    
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java

Modified: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java 
    2009-11-30 06:23:59 UTC (rev 814)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java 
    2009-11-30 06:34:35 UTC (rev 815)
@@ -57,7 +57,7 @@
     private ITestingEngine testingEngine = null;
 
     private TestContext testContext = null;
-
+    
     /**
      * This is the testing engine key that the webtester will use to find the 
correct testing engine from the registry.
      */
@@ -70,7 +70,7 @@
      * which is, htmlunit.
      *
      * @return IJWebUnitDialog instance used to wrapper htmlunit conversation.
-     * @deprecated You should not use plugin specific fonctionality. Please 
ask for a new core feature instead.
+     * @deprecated You should not use plugin specific functionality. Please 
ask for a new core feature instead.
      */
     public ITestingEngine getDialog() {
         return getTestingEngine();

Modified: 
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java
===================================================================
--- 
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java
       2009-11-30 06:23:59 UTC (rev 814)
+++ 
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java
       2009-11-30 06:34:35 UTC (rev 815)
@@ -905,10 +905,29 @@
      * Return the window with the given name in the current conversation.
      * 
      * @param windowName
+     * @throws WebWindowNotFoundException if the window could not be found
      */
-    private WebWindow getWindow(String windowName) {
+    public WebWindow getWindow(String windowName) {
         return wc.getWebWindowByName(windowName);
     }
+    
+    /**
+     * Return the currently opened window (issue 2697234).
+     * 
+     * @return the currently opened window
+     */
+    public WebWindow getCurrentWindow() {
+       return win;
+    }
+    
+    /**
+     * Return the current web client (issue 2697234).
+     * 
+     * @return the current web client
+     */
+    public WebClient getWebClient() {
+       return wc;
+    }
 
     private HtmlElement getHtmlElement(String anID) {
         try {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to