Find element by xpath and click on it
<p>I am trying to load complete list of images on a page. There is a "Show More" button on the page. I want to click it until all the images are loaded.</p>

<p><strong>HTML:</strong></p>

<pre><code>&lt;li class="show-more-row"&gt;
    &lt;button class="show-more-cta bottom-btn ga"data-ga-action="click"data-ga-label="category-see-more:SectionCourses&gt;Show More
        &lt;i class="lyndacon arrow-down"&gt;&lt;/i&gt;
    &lt;/button&gt;
&lt;/li&gt;
</code></pre>

<p>I have to tried to get the element by Xpath. But it keeps on changing every time I click on the button.</p>

<p>Example:</p>

<p><code>//*[@id="category-courses"]/li[101]/button</code> and <code>//*[@id="category-courses"]/li[151]/button</code></p>

<p>I have also tried finding element by class name:</p>

<pre><code>while(browser.find_element_by_class_name("show-more-cta bottom-btn ga")):
    moreElem = browser.find_element_by_class_name("show-more-cta bottom-btn ga")
    moreElem.click()
</code></pre>

<p>But it gives error: </p>

<blockquote>
  <p>invalid selector: Compound class names not permitted</p>
</blockquote>