package com.sdl.selenium.web.button;

import com.sdl.selenium.web.WebLocator;
import com.sdl.selenium.web.utils.Utils;
import org.apache.log4j.Logger;

public class InputButton extends WebLocator implements IButton {
    private static final Logger logger = Logger.getLogger(InputButton.class);

    public InputButton() {
        setClassName("InputButton");
        setTag("input");
    }

    /**
     * @param container is parent of item
     */
    public InputButton(WebLocator container) {
        this();
        setContainer(container);
    }

    /**
     *
     * @param container is parent of item
     * @param text is value from input item
     */
    public InputButton(WebLocator container, String text) {
        this(container);
        setText(text);
    }

    // Methods

    @Override
    protected String getItemPathText() {
        return hasText() ? "@value="+ Utils.getEscapeQuotesText(getText()) : null;
    }
}
@@ -78,50 +78,8 @@
 r;%0D%0A
-import com.sdl.selenium.web.utils.Utils;%0D%0A
 impo
@@ -539,16 +539,8 @@
 **%0D%0A
-     *%0D%0A
     
@@ -597,16 +597,21 @@
 am text 
+     
 is value
@@ -741,184 +741,43 @@
 etTe
-xt(text);%0D%0A    %7D%0D%0A%0D%0A    // Methods%0D%0A%0D%0A    @Override%0D%0A    protected String getItemPathText() %7B%0D%0A        return hasText() ? %22@value=%22+ Utils.getEscapeQuotesText(getText()) : null
+mplate(%22text%22, %22@value='%25s'%22, text)
 ;%0D%0A 

fix InputButton with template