I've finished my automated script with python selenium in Chrome normal mode and everything works great.
Until I decided to make it work in headless mode, so now I cannot locate a partial link text which already works in normal mode.
I'm using this code to open chrome in headless.
option = webdriver.ChromeOptions()
option.headless = True
This the code that I use to locate the element
tmp = True
Confirmm = driver.find_element_by_partial_link_text('Confirm')
tmp = False
And this is the code of the link text I'm trying to click
<a href="https://temp-mail.org/en/view/346e2949a4a1f77ededd7542ba7947ed" title="" class="viewLink title-subject" data-mail-id="346e2949a4a1f77ededd7542ba7947ed">Confirm your profile</a>
NOTE: the data-mail-id= is not static and changes every time.
Any idea how to solve this?