.text で文字が取得できない

.get_attribute("textContent")

を使うといけるかも。

※class 指定時に空白文字が含まれている場合には上記の対応が必要になるかも