lundi 23 mars 2020

How to validate a selectors without running the entire test from beginning

I was wonder if someone found an easy way to verify a selector work properly with the TestCafe syntax without running the entire test over and over?

E.g: I want to verify that the last table column cells has all the values in a array I provide:

in order to do I try to detect the last column but for validation, I have to execute the entire testcafe test from start. How do you recommend approaching this scenario? The following snippet I wrote to verify I catch all the right column cells, but it took me a while because each time I had to run the test again.

console.log(`total rows: ${await (Selector('tbody > tr').find('td:nth-of-type(3)')).count}`);

Another thing, how I save to array the most right column cells?

Source: Table for example

Aucun commentaire:

Enregistrer un commentaire