public ButtonTag(WebElement e) {
        super(e);
        d = 0;
        String s;
        if(e.getTagName().equals("details")){
            name = "Подробнее";
        }
        else if (e.getTagName().equals("input")) {
            s = e.getAttribute("value");
            if(s != null){
                name = s;
                if(s.equals("")){
                    d = Integer.MAX_VALUE;
                }
            } else {
                s = e.getAttribute("type");
                if(s.equals("submit")){
                    name = "Отправить";
                } else if(s.equals("reset")) {
                    name = "Изменить";
                } else {
                    d = Integer.MAX_VALUE;
                }
            }
        } else {
            s = e.getText();
            name = s;
            if(s == null){
                d = Integer.MAX_VALUE;
            }
        }
    }