I am trying to access an element using XPath in Behat and Mink context an element which has no but my function can't seem to find it
Here's the element structure:
<a data-iskeynav="true" data-test-id="compose-button" href="/d/compose/4661075315" class="e_dRA l_T cn_dBP cg_FJ k_w r_P A_6EqO u_e69 p_R S_n C_52qC I_Z1UEcsX D_F H_6VdP gl_C ab_C en_0 M_1Eu7sD ir3_Z1FS2Mn it3_dRA" role="button"
aria-label="Compose" tabindex="20">Compose</a>
And here's my php code
$page = $this->getSession()->getPage();
$element = $page->find('xpath', '//a[@data-test-id = "' . $id . '"]');
I even used this XPath, copied by the browser but with no success
//*[@id="app"]/div[1]/div/div[1]/nav/div/div[1]/a