CSS>Element-id>Match>text

Support
  • 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>Activate

    How can I match and click?

    Use the xpath text search selector

    //span[text()[contains(.,'Activate')]]
    

  • Can't copy rich TEXT and past

    Support
    0 Votes
    1 Posts
    505 Views
  • Typing Text, missing chracters

    Support
    1 Votes
    3 Posts
    753 Views
  • Type text is so slow

    Support
    0 Votes
    7 Posts
    1565 Views
  • 0 Votes
    6 Posts
    1895 Views
  • BAS does not show machine ID

    Support
    0 Votes
    4 Posts
    2320 Views