mardi 7 juin 2022

How can I check whether or not a data-testid exists on my page using Ruby?

How can I check whether or not a data-testid exists on my page using Ruby ? I ask this because I see that there are some ways to search for selectors, but I don't know exactly if this is the correct way or not. I'm trying to do it like this

expect(page).should have_no_selector("[data-testid='prepay-enroll-now-button']");



expect(page).should have_selector("[data-testid='prepay-enroll-now-button']");

Aucun commentaire:

Enregistrer un commentaire