'Scroll the main frame to the given anchor.'

def scroll_anchor(self, name):

    page = self.webview.page()
    old_pos = page.mainFrame().scrollPosition()
    page.mainFrame().scrollToAnchor(name)
    new_pos = page.mainFrame().scrollPosition()
    assert (old_pos != new_pos)
