vendredi 30 décembre 2022

how can I get a random text from txt in cypress

sorry I am new to cypress

I got a large txt file, it has 5000 lines of txt

all txt is divided by \n

12331565399
29165910115
58108651482
74656524192
70536463673
11606518282
15616508033
and more...

I stored this txt file in my fixtures

and in my e2e cy, I wrote

cy.readFile('./cypress/fixtures/list.txt')

it gives me all the txt file but I don't know how to pick a random txt from that file

please help me




Aucun commentaire:

Enregistrer un commentaire