@sponkly cbf8898b-5012-4782-b543-610ef89659d6-image.png
cf7e154f-0442-4304-ade1-8c25dc9be1c1-image.png
7afc7052-afb2-4d47-84f0-96a73fa688df-image.png
ca4e7a9b-5c8a-4e57-b780-226ff848ab14-image.png
i need to click on an element. The text is "Activate"
Previously I can just click on element-id, without specifying the text.
Now the element id keeps changing ie different id for each login session.
I cannot click on the element-id anymore.
I think maybe i should match the text because the text does not change .. it is always "Activate"
Upon inspection, the html for this text is
<span class="status-text _spcontent-zha-10">Activate</span>
I tried these but didn't work:
CSS>Match>Activate
Match>Activate
How can I match and click?
@hifive said in CSS>Element-id>Match>text:
i need to click on an element. The text is "Activate"
Previously I can just click on element-id, without specifying the text.
Now the element id keeps changing ie different id for each login session.
I cannot click on the element-id anymore.
I think maybe i should match the text because the text does not change .. it is always "Activate"Upon inspection, the html for this text is
<span class="status-text _spcontent-zha-10">Activate</span>I tried these but didn't work:
CSS>Match>Activate
Match>ActivateHow can I match and click?
Use the xpath text search selector
//span[text()[contains(.,'Activate')]]