How to extract the list ['Cat1', 'Cat2', 'Cat3'] from the following block which is within the popup using Selenium python API.
...
<div class="categoryPopup" id="categoryPopup">
<div class="categoriesList"><li id="addCategory_231329891" class="edit_form_add_category">
<input id="checkCategory_231329891" class="fl" type="checkbox"><label for="checkCategory_231329891"><span class="title fl">Cat1</span></label>
<div class="cb"></div>
</li><div class="cb"></div><li id="addCategory_231329901" class="edit_form_add_category">
<input id="checkCategory_231329901" class="fl" type="checkbox"><label for="checkCategory_231329901"><span class="title fl">Cat2</span></label>
<div class="cb"></div>
</li><div class="cb"></div><li id="addCategory_231330011" class="edit_form_add_category">
<input id="checkCategory_231330011" class="fl" type="checkbox"><label for="checkCategory_231330011"><span class="title fl">Cat3</span></label>
<div class="cb"></div>
</div>
...
Tried to use the following code to no avail:
from selenium import webdriver
browser = webdriver.Firefox()
browser.get("http://targeURL")
# series of successful browser.get_element_by...
browser.get_element_by_class_name("categoriesList") # fails with NoSuchElementException