title: How to get class name by using id in javascript
body: <p>I have a HTML Element, or list item, which has both an <code>id</code> and a <code>class</code> assigned to it. I am writing automated tests, and I need to check the <code>class</code> for this element. In the test, when I call <code>window.document.getElementById('my-element-id')</code>, it does return the correct element, but there is no <code>class</code> property on it. Is there another way to check the <code>class</code>?</p>