def scroll_element_into_view ( self ) : x = self . web_element . location [ 'x' ] y = self . web_element . location [ 'y' ] self . driver . execute_script ( 'window.scrollTo({0}, {1})' . format ( x , y ) ) return self
python scroll into view
Scroll element into view
def scroll_element_into_view(self):
        """Scroll element into view

        :returns: page element instance
        """
        x = self.web_element.location['x']
        y = self.web_element.location['y']
        self.driver.execute_script('window.scrollTo({0}, {1})'.format(x, y))
        return self