masquerade
masquerade copied to clipboard
Add SplitPanel component
It would be nice to have methods: Sidebar.setOpen(Boolean), Sidebar.isDisplayed().
Now I use the next realization of the Sidebar.
public class Sidebar extends Composite<Sidebar> {
public void open() {
sleep(300);
if ($(By.className("c-splitpanel-dock-button-left")).isDisplayed()) return;
SelenideElement splitpanelButtonRight = $(By.className("c-splitpanel-dock-button-right"));
splitpanelButtonRight.shouldBe(Condition.visible);
while (splitpanelButtonRight.isDisplayed()) {
splitpanelButtonRight.click();
$(By.className("c-splitpanel-dock-button-left")).shouldBe(Condition.visible);
splitpanelButtonRight = $(By.className("c-splitpanel-dock-button-right"));
}
}
}
Known issue: Sometimes it opens search folder.
Not a generic case.
@dtsaryov we should implement the SplitPanel component as an ability to work with it on the main screen:
- check, if it is visible
- open and close it