Is it possible to get the text inside this button which is "Confirm" and click on it?
Also, I learned that we use .click() to click on elements
Because the Classes changes frequently, so how to click this button according to the Text which is Confirm.
This is the relevant button code which is a span :
<span jsslot="" class="CwaK9"><span class="RveJvd snByac">Confirm</span></span>
Here is the full button code :
<div class="yKBrKe" jsname="hWDCP">
<div role="button" class="U26fgb O0WRkf zZhnYe C0oVfc Zrq4w NTcbm RHAxtb M9Bg4d" jscontroller="VXdfxd" jsaction="click:cOuCgd; mousedown:UX7yZ; mouseup:lbsD7e; mouseenter:tfO1Yc; mouseleave:JywGue;
focus:AHmuwe; blur:O22p3e; contextmenu:mg9Pef;touchstart:p6p2H; touchmove:FwuNnf; touchend:yfqBxc(preventMouseEvents=true|preventDefault=true); touchcancel:JMtRjd;" jsshadow="" jsname="UjXomb" tabindex="0">
<div class="Vwe4Vb MbhUzd" jsname="ksKsZd"></div>
<div class="ZFr60d CeoRYc"></div><span jsslot="" class="CwaK9">
<span class="RveJvd snByac">Confirm</span></span>
</div>
</div>