public void toggle() {
        PrimeSelenium.executeScript(isOnChangeAjaxified(), getWidgetByIdScript() + ".toggle();");
    }
Turns this switch in case it is off, or turns of off in case it is on.
primefaces-selenium/primefaces-selenium-components/src/main/java/org/primefaces/selenium/component/base/AbstractToggleComponent.java