使用python计算web应用程序表中的行数

使用python计算web应用程序表中的行数,python,selenium-webdriver,Python,Selenium Webdriver,如何使用selenium python webdriver计算web应用程序表中的行数。。。我试过这个,但没有成功: rowcount = self.driver.find_elements_by_xpath("//table[@class='alert-list table']/tbody/tr") rowCount=self.driver.find_elements_by_xpath("//table[@class='alert-list table']/tbody/tr").si

如何使用selenium python webdriver计算web应用程序表中的行数。。。我试过这个,但没有成功:

rowcount = self.driver.find_elements_by_xpath("//table[@class='alert-list table']/tbody/tr")
    rowCount=self.driver.find_elements_by_xpath("//table[@class='alert-list table']/tbody/tr").size();