View Javadoc

1   /*
2       Jameleon Watij plug-in - A plug-in that uses Watij (http://www.watij.com/) to drive web sites
3       Copyright (C) 2008 Christian W. Hargraves (engrean@hotmail.com)
4   
5       This program is free software; you can redistribute it and/or modify
6       it under the terms of the GNU General Public License as published by
7       the Free Software Foundation; either version 2 of the License, or
8       (at your option) any later version.
9   
10      This program is distributed in the hope that it will be useful,
11      but WITHOUT ANY WARRANTY; without even the implied warranty of
12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13      GNU General Public License for more details.
14  
15      You should have received a copy of the GNU General Public License
16      along with this program; if not, write to the Free Software
17      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  
19  */
20  package net.sf.jameleon.plugin.watij.tags;
21  
22  import net.sf.jameleon.exception.JameleonScriptException;
23  import net.sf.jameleon.plugin.watij.WatijFunctionTag;
24  /***
25   * Click the browser's forward button.
26   * 
27   * An example of its use might be:
28   * 
29   * <pre><source>
30   * &lt;testcase xmlns="jelly:jameleon"&gt;
31   *     &lt;watij-session baseUrl="http://jameleon.sourceforge.net" beginSession="true"&gt;
32   *       &lt;watij-click-link
33   *           functionId="Click on the 'Overview' link."
34   *           link="Overview"/&gt;
35   *       &lt;watij-back
36   *           functionId="Go back to the home page."/&gt;
37   *       &lt;watij-forward
38   *           functionId="Go to the Overview page."/&gt;
39   *     &lt;/watij-session&gt;
40   * &lt;/testcase&gt;
41   * </source></pre>
42   * 
43   * @jameleon.function name="watij-forward" type="action"
44   */
45  public class WatijForwardTag extends WatijFunctionTag{
46  
47      public void testBlock() {
48          try{
49              ie().forward();
50          }catch(Exception e){
51              throw new JameleonScriptException("Could not click the Forward button", e, this);
52          }
53      }
54  
55  
56  }