目的

http://www.tenki.jp/forecast/3/16/4410/13208.html
このページの「調布市の警報・注意報」部分のheight,widthの取得

やったこと

from selenium import webdriver
URL = "http://www.tenki.jp/forecast/3/16/4410/13105-daily.html"
driver = webdriver.PhantomJS()
driver.get(URL)
print(driver.execute_script("return document.getElementsByClassName('class')[1].offsetWidth;"))

[参考]
https://stackoverflow.com/questions/42610379/how-to-get-a-websites-body-width-with-selenium-and-python
しかし、最終行で
raise exception_class(message, screen, stacktrace)
(省略)
Screenshot: available via screen
とでてきます。
しかし、最終行を

print(driver.execute_script("return document.body.offsetWidth;")    

としたところ400という数字が返ってきたので、仮想ブラウザ上でも要素のheightは取得できると考えました。

driver.execute_script()は元のhtmlにjsを挿入してその結果を受け取るものだと解釈したので、DOMの書式に従って

document.getElementsByClassName('class')[1].offsetWidth

としたのですが、何がいけないのでしょうか?
https://developer.mozilla.org/ja/docs/Web/API/Document/getElementsByClassName

また、
https://stackoverflow.com/questions/15664000/how-to-programmatically-measure-the-elements-sizes-in-html-source-code-using-py
によればGhostというライブラリを用いれば可能なようなのですが、PysideやPyQtを入れたくないので、seleniumでの解決法を知りたいです。