vendredi 26 février 2021

How can I locate a parent of an element know by child value using CodeceptJS

basically I have the following:

<div class="container">
  <div class="title">title 1</div>
</div>
<div class="container">
  <div class="title">title 2</div>
</div>
<div class="container">
  <div class="title">title 3</div>
</div>

I want to locate the container that has "title 2" as title, without Xpath Please. I mean just css selectors and codeceptJS functions. Is it possible to do it?

Aucun commentaire:

Enregistrer un commentaire