I am having problems calling multiple elements with the same class name when using .innerhtml. For instance the url I am working with is:
https://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=hen
and when I enter the following code in chrome console I get:
document.getElementsByClassName('a-size-small a-color-secondary')
<span class="a-size-small a-color-secondary">by </span>
<span class="a-size-small a-color-secondary">Adore Plush Company</span>
<span class="a-size-small a-color-secondary">Get it by <span class="a-color-success a-text-bold">Tuesday, Jun 21</span></span>
...
...
But when I enter: document.getElementsByClassName('a-size-small a-color-secondary').innerHTML
I get "undefined". The goal is to get just the text between the span tags.
Can someone give me some guidance? I have tried with different variations including var and even Selection method. It worked with Selection for the first class element but didn't work at all with SelectionAll. Thanks for any help.