public function fixToolbar()
    {
        $driver = $this->getSession()->getDriver();
        if (! $driver instanceof Selenium2Driver || ! $driver->getWebDriverSession()) {
            return;
        }

        try {
            $this->getSession()->getDriver()->executeScript(
                'if (document.getElementById("wpadminbar")) {
                    document.getElementById("wpadminbar").style.position="absolute";
                    if (document.getElementsByTagName("body")[0].className.match(/wp-admin/)) {
                        document.getElementById("wpadminbar").style.top="-32px";
                    }
                };'
            );
        } catch (\Exception $e) {
            /*
             * If a browser is not open, then Selenium2Driver::executeScript() will throw an exception.
             * In this case, our toolbar workaround obviously isn't required, so fail quietly.
             */
        }
    }
public function fixToolbar()
    {
        $driver = $this->getSession()->getDriver();
        if (! $driver instanceof Selenium2Driver || ! $driver->getWebDriverSession()) {
            return;
        }

        try {
            $this->getSession()->getDriver()->executeScript(
                'if (document.getElementById("wpadminbar")) {
                    document.getElementById("wpadminbar").style.position="absolute";
                    if (document.getElementsByTagName("body")[0].className.match(/wp-admin/)) {
                        document.getElementById("wpadminbar").style.top="-32px";
                    }
                };'
            );
        } catch (\Exception $e) {
            /*
             * If a browser is not open, then Selenium2Driver::executeScript() will throw an exception.
             * In this case, our toolbar workaround obviously isn't required, so fail quietly.
             */
        }
    }
public function fixToolbar ( ) { $ driver = $ this -> getSession ( ) -> getDriver ( ) ; if ( ! $ driver instanceof Selenium2Driver || ! $ driver -> getWebDriverSession ( ) ) { return ; } try { $ this -> getSession ( ) -> getDriver ( ) -> executeScript ( 'if (document.getElementById("wpadminbar")) {
                    document.getElementById("wpadminbar").style.position="absolute";
                    if (document.getElementsByTagName("body")[0].className.match(/wp-admin/)) {
                        document.getElementById("wpadminbar").style.top="-32px";
                    }
                };' ) ; } catch ( \ Exception $ e ) { /*
             * If a browser is not open, then Selenium2Driver::executeScript() will throw an exception.
             * In this case, our toolbar workaround obviously isn't required, so fail quietly.
             */ } }
When using the Selenium driver, position the admin bar to the top of the page, not fixed to the screen.
Otherwise the admin toolbar can hide clickable elements.

@BeforeStep
When using the Selenium driver position the admin bar to the top of the page not fixed to the screen . Otherwise the admin toolbar can hide clickable elements .