Skip to content

Commit

Permalink
Fix popup button trigger by text
Browse files Browse the repository at this point in the history
  • Loading branch information
jreznot committed Dec 7, 2018
1 parent 60ae4c9 commit 39059c5
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
import java.util.List;

import static com.codeborne.selenide.Condition.visible;
import static com.codeborne.selenide.Selectors.byText;
import static com.codeborne.selenide.Selenide.$;
import static com.codeborne.selenide.Selenide.$$;
import static com.haulmont.masquerade.Selectors.byChain;
import static com.haulmont.masquerade.Selectors.byCubaId;
import static com.haulmont.masquerade.Selectors.*;
import static com.haulmont.masquerade.sys.TagNames.SPAN;
import static com.haulmont.masquerade.sys.VaadinClassNames.disabledClass;
import static com.haulmont.masquerade.sys.matchers.InstanceOfCases.hasType;
Expand All @@ -37,6 +35,8 @@

public class PopupButtonImpl extends AbstractComponent<PopupButton> implements PopupButton {

public static final By POPUP_PANEL = By.cssSelector("div.v-popupbutton-popup");

public PopupButtonImpl(By by) {
super(by);
}
Expand All @@ -53,15 +53,15 @@ public PopupContent openPopupContent() {
.shouldNotHave(disabledClass)
.click();

PopupContentImpl popupContent = new PopupContentImpl(By.cssSelector("div.v-popupbutton-popup"));
PopupContentImpl popupContent = new PopupContentImpl(POPUP_PANEL);
popupContent.shouldBe(visible);

return popupContent;
}

@Override
public PopupContent getPopupContent() {
PopupContentImpl popupContent = new PopupContentImpl(By.cssSelector("div.v-popupbutton-popup"));
PopupContentImpl popupContent = new PopupContentImpl(POPUP_PANEL);
popupContent.shouldBe(visible);

return popupContent;
Expand Down

0 comments on commit 39059c5

Please sign in to comment.