dimanche 16 août 2020

TestCafe t.eval vs. ClientFunction

What is the difference between TestCafes t.eval() function and ClientFunctions?

I've been using TestCafe for a while now and didn't stumble across the eval function until now.

I am curious, but I also have a concrete use case, which is not the subject of this question, but might help me understand the difference between both. I'd like to do simple page manipulation tasks like hiding elements from my tests code. The documentation clearly says that ClientFunction should not be used for this: "Do not modify the tested webpage within client functions. Use test actions to interact with the page instead." Is the eval function suitable for this?

Aucun commentaire:

Enregistrer un commentaire