mercredi 20 janvier 2021

how to define in TestCafe a classname selector showing multiple times?

Im struggling to define a Selector in TestCafe that clicks that YES button in the photo below enter image description here

I can find and click the fist YEs button like

  .click(Selector('.c-segmented-control__label').withExactText("Yes"))

However the second Yes button has the same classname so my Script cannot find it, how can I define the Selector for that one? I have tried child, nth and all but it doesnt find it.

Thanks

Aucun commentaire:

Enregistrer un commentaire