Is there a way to retrieve a list of elements using a specific class name in JavaScript with Selenium?
I am specifically looking for elements that have the class message_body
. I need an array that includes all elements with this class.
Unfortunately,
driver.findElements(By.className("message_body"))
is not yielding the expected results. It seems to be returning something different.
What alternative method can I use to obtain this desired list of elements?