package com.sdl.bootstrap.window;

import com.sdl.selenium.web.WebLocator;

public class PopOver extends WebLocator {

    private PopOver() {
        setInfoMessage("PopOver");
        setClasses("popover");
        setTemplate("title", "count(.//*[@class='popover-title' and text()='%s'])> 0");
    }

    public PopOver(String title, String message) {
        this(title);
        setTemplate("title", "count(.//*[@class='popover-title' and text()='%s']//following-sibling::*[@class='popover-content' and text()='" + message + "'])> 0");
    }

    public PopOver(String title) {
        this();
        setTitle(title);
    }
}
@@ -30,16 +30,179 @@
 dow;%0D%0A%0D%0A
+import com.sdl.bootstrap.button.Button;%0D%0Aimport com.sdl.selenium.conditions.ConditionManager;%0D%0Aimport com.sdl.selenium.conditions.ElementRemovedSuccessCondition;%0D%0A
 import c
@@ -806,10 +806,313 @@
 %0D%0A    %7D%0D
+%0A%0D%0A    public boolean close() %7B%0D%0A        return new Button(this, %22Close%22).click() && waitClose(this, 2000);%0D%0A    %7D%0D%0A%0D%0A    private boolean waitClose(WebLocator popOver, long time) %7B%0D%0A        return new ConditionManager(time).add(new ElementRemovedSuccessCondition(popOver)).execute().isSuccess();%0D%0A    %7D%0D
 %0A%7D

add close() method in PopOver