File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
modules/web/src/main/java/com/haulmont/masquerade/components/impl Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1616
1717package com .haulmont .masquerade .components .impl ;
1818
19+ import com .codeborne .selenide .SelenideElement ;
1920import com .haulmont .masquerade .Components ;
2021import com .haulmont .masquerade .components .AppMenu ;
2122import org .openqa .selenium .By ;
2526import static com .codeborne .selenide .Condition .visible ;
2627import static com .codeborne .selenide .Selectors .byXpath ;
2728import static com .codeborne .selenide .Selenide .$ ;
29+ import static com .codeborne .selenide .Selenide .Wait ;
30+ import static org .openqa .selenium .support .ui .ExpectedConditions .elementToBeClickable ;
2831
2932public class AppMenuImpl extends AbstractComponent <AppMenu > implements AppMenu {
3033
@@ -50,10 +53,15 @@ public void openItem(String... path) {
5053 String itemXpath = "//span[contains(@class, 'v-menubar-menuitem') " +
5154 "and @cuba-id=" + Quotes .escape (s ) + "]" ;
5255
53- $ (byXpath (itemXpath ))
56+ SelenideElement menuItemElement = $ (byXpath (itemXpath ));
57+
58+ menuItemElement
5459 .shouldBe (visible )
55- .shouldBe (enabled )
56- .click ();
60+ .shouldBe (enabled );
61+
62+ Wait ().until (elementToBeClickable (menuItemElement ));
63+
64+ menuItemElement .click ();
5765 }
5866 }
5967}
You can’t perform that action at this time.
0 commit comments