public/phpmyadmin/test/selenium/TestBase.php
/**
     * Scrolls to a coordinate such that the element with given id is visible
     *
     * @param string $element_id Id of the element
     * @param int    $offset     Offset from Y-coordinate of element
     *
     * @return void
     */
Scrolls to a coordinate such that the element with given id is visible
@param string $element_id Id of the element
@param int    $offset     Offset from Y-coordinate of element

@return void
Scrolls to a coordinate such that the element with given id is visible @param string $element_id Id of the element @param int $offset Offset from Y - coordinate of element @return void
public function scrollIntoView($element_id, $offset = 70)
    {
        $this->execute(
            array(
                'script' => 'var position = document.getElementById("'
                            . $element_id . '").getBoundingClientRect();'
                            . 'window.scrollBy(0, position.top-(' . $offset . '));',
                'args'   => array()
            )
        );
    }
public function scrollIntoView ( $ element_id , $ offset = 70 ) { $ this -> execute ( array ( 'script' => 'var position = document.getElementById("' . $ element_id . '").getBoundingClientRect();' . 'window.scrollBy(0, position.top-(' . $ offset . '));' , 'args' => array ( ) ) ) ; }
Scrolls to a coordinate such that the element with given id is visible
 @param string $element_id Id of the element
 @param int    $offset     Offset from Y-coordinate of element
Scrolls to a coordinate such that the element with given id is visible @param string $element_id Id of the element @param int $offset Offset from Y - coordinate of element
// 70pt offset by-default so that the topmenu does not cover the element