View Javadoc

1   /**
2    * .
3    */
4   package org.sirius.client.web.classes;
5   
6   /**
7    * @author Myk Kolisnyk
8    * .
9    */
10  public class WebButton extends WebControl {
11  
12      /**
13       * @param parent .
14       * @param locator .
15       */
16      public WebButton(final Frame parent, final String locator) {
17          super(parent, locator);
18          // TODO Auto-generated constructor stub
19      }
20  
21      /**
22       * @param parent .
23       * @param parentElement .
24       * @param locator .
25       */
26      public WebButton(final Frame parent, final String parentElement,
27              final String locator) {
28          super(parent, parentElement, locator);
29          // TODO Auto-generated constructor stub
30      }
31  
32      /**
33       * .
34       * @return .
35       * @throws Exception .
36       */
37      public final String text() throws Exception {
38          String text = client().core().getAttribute(getParentElement(), getLocator(),
39                  "value");
40          if (text.equals("")) {
41              text = this.innerText();
42          }
43          return text;
44      }
45  }