Hey friends and welcome to Nomadic Dmitry channel. In the previous episodes we have discussed automating
this Formy Web Form which is a simple Web form and for that we used a framework which is called
TestCafe. We coded everything manually and it was nicely structured. The objective was to automate
it using modern and simple tools. But today we are going to go further and instead of using the code
we are going to automate it using the tool which is called TestCafe Studio. Using this tool you
can outline test scenarios using simple commands. That's not the best way of automating things in
the application, but it's a nice way of quickly identifying locators on a webpage. Let's go ahead
and do that. Once we open the tool we are seeing the screen. We can enter the website URL to start
testing there. Once we do that we start recording the actions that user performs. It's created a new
fixture and it's going to record all the actions that you take there. Once it loaded we can start
interacting with a Webpage and enter data. I'm going to type all data here and press the "Submit"
button. Now we can go back to the main page and we can see that all the actions have
been recorded here. You can also explore other important options such as assertions
and other things. We will discuss those in other videos about TestCafe. We can now stop the test,
we are done here. Let's open those tests by pressing the "Start" button here. Ok, so starts
the Browser (Chrome in this case), it connects and starts executing our test scenario. As you can see
it repeats all the actions and then submits the form as we discussed. Probably it's not
the best idea to execute tests like this. That's why we need to transform it to JavaScript file
and then execute separately as needed. Let's do that. Now we have a file that shows everything in
a JavaScript file and we can still press the "Run" button to execute those tests. This is a good tool
that allows you to draft your tests and then modify as you need it. I like the interface here -
it's nice. We can also select a browser there and pick the option that we need. Notice that there is
a "headless" option as well which allows us to run those tests without actually opening a
browser window. Instead, it will just run this as a process without a UI. Notice that the text has some typos because script repeats all actions, including typos
while typing the information in the webform. Remember that it records all your actions.
That's why it's mostly used for drafting the tests and then modifying and using those in the future.
We can see at the bottom that our tests executed fine and had no errors. This is it, friends.
It was a simple guide on how to start automating Web Pages using TestCafe framework. Thank you
for watching and please subscribe for more videos. I appreciate your comments as well.