InBrowserSinglton { public static boolean isSelected(final Path el) { return getBrowser().isSelected(el); }  static WebElement find(final Path el); static List<WebElement> findAll(final Path el); static Integer numberOfAppearances(final Path el); static boolean isPresent(final Path el); static boolean isEnabled(final Path el); static boolean isSelected(final Path el); static boolean isDisplayed(final Path el); static WebElement clickOn(final Path el); static WebElement clickAt(final Path el); static WebElement contextClick(final Path el); static WebElement rightClick(final Path el); static WebElement hoverOver(Path el); static WebElement scrollTo(final Path el); static Operations.Scroll scroll(); static Operations.ScrollElement scrollElement(final Path el); static Operations.ScrollElement scrollElementWithStepOverride(final Path el, int step); static void doubleClickOn(final Path el); static Operations.KeysSender sendKeys(CharSequence... charsToSend); static Operations.KeysDown pressKeyDown(CharSequence thekey); static Operations.ReleaseKey releaseKey(CharSequence thekey); static Operations.DragAndDrop dragAndDrop(final Path path); static Select getSelect(final Path el); static List<String> getCssClasses(final Path el); static WebDriver driver; }
@Test public void isSelectedTest() { when(webElement.isSelected()).thenReturn(true); assertThat(InBrowserSinglton.isSelected(BasicPath.div), is(equalTo(true))); when(webElement.isSelected()).thenReturn(false); assertThat(InBrowserSinglton.isSelected(BasicPath.div), is(equalTo(false))); }