def move_to_element(browser, css_selector, header_height=155):
 wait_until_condition(browser, (lambda x: x.is_element_present_by_css(css_selector)))
 element = browser.driver.find_element_by_css_selector(css_selector)
 y = (element.location['y'] - header_height)
 browser.execute_script(('window.scrollTo(0, %s)' % y))

def move_to_element ( browser , css_selector , header_height = 155 ) : wait_until_condition ( browser , ( lambda x : x . is_element_present_by_css ( css_selector ) ) ) element = browser . driver . find_element_by_css_selector ( css_selector ) y = ( element . location [ 'y' ] - header_height ) browser . execute_script ( ( 'window.scrollTo(0, %s)' % y ) )
scroll the browser window to the element .