'Use keyboard navigation to traverse form elements.
Skip any intervening elements that have tab stops (namely, links).
If specified, validate the # links skipped, or the total # of tabs needed.'

def browser_next_form_element(self, num_expected_links=None, max_tabs=10, browser=None):

    browser = (browser or self.browser)
    switch_to_active_element(browser)
    self.browser_send_keys(Keys.TAB, browser=browser)
    num_tabs = 1
    num_links = 0
    while ((num_tabs <= max_tabs) and (switch_to_active_element(browser).tag_name not in self.HtmlFormElements)):
        num_links += (switch_to_active_element(browser).tag_name == 'a')
        self.browser_send_keys(Keys.TAB, browser=browser)
        num_tabs += 1
    return num_tabs
