'Get html table row count and compare against the db row count'

def compareRowCount(self, dbRowCount):

    browser = self.browser
    elem = WebDriverWait(browser, 30).until((lambda driver: driver.find_element_by_id('datatable_length')))
    htmlRowCount = len(browser.find_elements_by_xpath("//*[@id='datatable']/tbody/tr"))
    successMsg = ('DB    row    count    (%s)    matches    the    HTML    table    row    count    (%s).' % (dbRowCount, htmlRowCount))
    failMsg = ('DB    row    count    (%s)    does    not    match    the    HTML    table    row    count    (%s).' % (dbRowCount, htmlRowCount))
    self.assertTrue((dbRowCount == htmlRowCount), failMsg)
    self.reporter(successMsg)
