This element is a arrow button which is used to expand a block. That element is a arrow button of linked-in website of messaging box. There is a messaging box in bottom right corner of linked-in website page. So I want to click on that arrow.I tried many paths but it gives me nosuchelement exception. The main thing is id="ember84" this id always changes of that element whenever we refresh page so this below path doesn't work
xpath("//button[@id='ember84']")
This is the HTML of that complete element
<button id="ember84" class="msg-overlay-bubble-header__control msg-overlay-bubble-header__control--new-convo-btn artdeco-button artdeco-button--circle artdeco-button--muted artdeco-button--1 artdeco-button--tertiary ember-view" xpath="1"> <li-icon aria-hidden="true" type="chevron-down-icon" class="artdeco-button__icon" size="small"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" data-supported-dps="16x16" fill="currentColor" class="mercado-match" width="16" height="16" focusable="false">
<path d="M1 5l7 4.61L15 5v2.39L8 12 1 7.39z"></path>
</svg></li-icon>
<span class="artdeco-button__text">
You are on the messaging overlay. Press enter to minimize it.
</span></button>
I tried this path also but it gives nosuchelement exception
msg = driver.find_element_by_xpath('//button[1]//li-icon[1]//span[constains(text(), "You are on the messaging overlay. Press enter to minimize it.")]')