package com.sdl.selenium.web.button;

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

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

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

    public SimpleUploadButton(WebLocator container) {
        this();
        setContainer(container);
    }

    public SimpleUploadButton(WebLocator container, String id) {
        this(container);
        setId(id);
    }

    public void uploadFile(String path) {
        sendKeys(path);
    }

    public void uploadFileWithJS(String path, String id) {
        executeScript("return (function(id){var d=document.getElementById(id);d.style.visibility='visible';d.style.height='1px'; d.style.width='1px'; d.style.opacity=1;return d.getAttribute('style') != ''}('" + id + "'));");
        sendKeys(path);
    }
}

@@ -74,40 +74,8 @@
 tor;
-%0Aimport org.apache.log4j.Logger;
 %0A%0Apu
@@ -128,93 +128,8 @@
 or %7B
-%0A    private static final Logger logger = Logger.getLogger(SimpleUploadButton.class);
 %0A%0A  
@@ -531,32 +531,34 @@
 th);%0A    %7D%0A%0A    
+/*
 public void uplo
@@ -845,16 +845,18 @@
 (path);%0A
-
     %7D
+*/
 %0A%7D%0A

remove uploadFileWithJS from SimpleUploadButton