Hey guys and welcome to Nomadic Dmitry channel
In the previous episode we have discussed how to automate the Formy App
Which is this website right there
We have automated it without using the Page Object concept
I discussed this concept in one of my previous videos
But this was about WebDriver
And today we are going to automate the same thing using TestCafe
Here is how it looked like - it all used to be in one place which is not great
We need to restructure our tests
to be able to easily add more things to our tests
Here is how re-structured tests look like
Instead of using everything in one place - we are using it in a separate page and calling appropriate methods
Imagine if you have 20 pages or more - how to handle all that?
We are creating a separate class for each page we have.
We are filling out our form here by calling those methods
We have a constructor here where we match all the values to exact path of the element
And then we implement methods that actually "type" or "click" data into our fields
Sometimes there are two actions in one methods
I like the fact that in TestCafe we don't need to configure it much and it just works
And we can use any supported web browser here
This is how it performs all the actions
We can automated other tests if we want too on this form
Feel free to try it
Thank you for watching and please subscribe for more videos!