使用selenium python在页面中查找特定文本

使用selenium python在页面中查找特定文本,python,firefox,selenium,selenium-webdriver,Python,Firefox,Selenium,Selenium Webdriver,我正在尝试使用selenium python从页面中查找特定文本。我正在从上面的url中查找元素名称-当前版本。我使用了下面的代码 browser = webdriver.Firefox() # Get local session of firefox browser.get(sampleURL) # Load page elem = browser.find_elements_by_clsss_name("Current Version") # Find the query box

我正在尝试使用selenium python从页面中查找特定文本。我正在从上面的url中查找元素名称-当前版本。我使用了下面的代码

 browser = webdriver.Firefox() # Get local session of firefox
 browser.get(sampleURL) # Load page

 elem = browser.find_elements_by_clsss_name("Current Version") # Find the query box
 print elem;
 time.sleep(2) # Let the page load, will be added to the API
 browser.close()

我似乎没有把输出打印出来。我在这里做错了什么吗?

没有名为“当前版本”的类。如果要捕获“当前版本”文本下方的版本号,可以使用以下表达式:

browser.find_element_by_xpath("//div[@itemprop='softwareVersion']")

没有类为
当前版本
的元素。