Katalon Studio for Complete Beginners | Step by Step Masterclass Part 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome all of you this is a master class on catalon studio so i'm going to create a complete session i'm going to teach you catalan studio from scratch so this is going to be a very basic if you are a complete beginner on catalog studio you can follow along with me i will start step by step i will start from scratch and we will go up step by step so in this uh session this will be a very practical hands-on session and i will show you right from scratch how do we download and set up catalog studio how do we uh i will tell you about the gui and features and then we will start automation testing with catalog studio so in this session i will show you examples demo and everything will be step by step uh you can follow me on windows or mac operating system or you can also use linux now for the gui part when we will start the platform we will open the tool we will look at the gui and we will create all our tests and all the all the artifacts or you will need a operating system which has the gui like windows or mac and when we do the command line you can do it on linux as well so therefore i have mentioned here that you can follow this on windows mac or linux operating system i will be using my windows system mostly for creating my tests and all the other things on catalog studio but the process will be same on mac operating system so you can follow this on windows mac and the command line you can do on linux as well a little bit about myself i am rakhav i'm a training partner with catalan studio and i also do trainings on catalon and other automation topics automation testing devops and ci you can find all my work on my website automationstepbystep.com so just to show you if you go on my website that is automation step by step dot com here you can find all these uh all the tutorials so here you can see all the topics that i teach on so you can always check from here and this master class will also go here and with that we can start with the topics so in this session in this master class i will start with introduction and we will start with catalan studio we will look at how do we download and set up catalog studio we will look at the gui and features of the platform and then we will start with web ui automation testing that is browser automation testing and i will tell you about the different modes of test creation there are three different modes in catalog studio or we can do recording we can create the test manually or we can also use scripting i will tell you all the three modes we will look at test cases test suites and test suite collections we will see how do we look at the logs and look at the reports we will see custom keywords how do we create and run custom keywords we are going to look at execution environments what are execution environments what are execution profiles uh what if you have to run your tests on different environments how do you manage all the environments and then we will look at catalon recorder what is catalon recorder how do we use it we'll see how do we record and spy on existing active browsers that is the your system browser how can we use that to record and spy objects we will look at variables what are variables in catalog studio what are different types of variables how do we use them then we will move to data driven testing how can we get our data from external sources like excel file or csv file and how can we use that test data into our test cases we will look at what are check points how do we use check points in catalog studio we will look at command line runs how do we create commands and how do we run our tests from command line we look at failure handling what is failure handling how do we manage failure handling in catalog studio we will look at listeners what are listeners how do we use listeners then we will look at setup and teardown in catalon studio we will look at self healing what is self healing uh so basically uh whenever there are some changes in your applications from the back end and when you run your test and there are some failures because automation scripts are not able to find or recognize the objects because they might have changed or they might have got replaced in that case how can the self-healing capabilities of catalon studio can work and can find out the objects using some artificial intelligence we will look at that we will see how do we debug and troubleshoot in case of failures in catalon studio and then we will look at frames handling how do we handle frames we will look at visual validation visual validation is uh apart from the functionality that we test like the basic functionality we can also test the look and feel of our web pages of our web applications like the color the pixel the sizes the location of the different objects all this we can check with visual validation uh we will look at how do we put our project on cloud repositories like github and then how can we integrate with source code management systems like git and finally i will tell you some useful tips and best practices so this is going to be the agenda for this master class for this complete hands-on training on catalog studio uh i will suggest that you can follow along with me with hands-on and if you have any questions any doubts you can always let me know i will have all these notes and all the all the text in the description of this video sometimes it may happen that uh the description section has limit on words if that happens and if the if the notes are more than the limit i will always have of pdf file uploaded and i will provide you the link so all the links all the notes will be in the description section so i believe we are good to start so let's get started and let us start with introduction to catalog studio now if i go to i'll go to my browser here so this is my windows system here and this is my mac system here so you can see this is my mac system here and here i have my windows system so i'm just going to my browser and i will go to catalon.com and this is the website of catalon studio and here here you can see all the details about catalon studio and all the features so here you can find all the platforms it can work with so in catalog studio we can work with web mobile api and desktop so that means in catalog studio you can do testing on web applications mobile applications apis and desktop uh then you can see here if i scroll down you can see some more features and here you can see it can do continuous integration continuous testing there are some integrations we can do for ci cd in catalon studio and you will see all the details here now if i scroll up and here you can see there is a link for products and here we have catlon studio we have catalon desktops we have catalon test cloud and catalog recorder and then here you will also see uh the solutions for web testing api testing mobile testing desktop testing integrations and methodologies so let's say if you are interested in doing web testing with catalog studio if you click here it will take you to this web testing and you will see some information about web testing and if you scroll down you can see all that you can do with catalog studio for web testing similarly you can see other solutions now here if you go to resources you can see the documentation and then you also have a community here you can see the webinars blogs etc and this is about catalog studio so the first thing you will have to do is so this is uh about catalon studio catalon studio is a platform that you can use for automation testing on web mobile api and desktop and you can use it for any of these automation testing it is a very simple and easy tool to use so if you have not done automation testing anytime in your life and you are not good in programming or this is the first time you are doing automation testing you can use this tool it is very easy in a moment i will show you you can just download it you can create your account and you can get started with automation testing so uh let us start with the download and setup part and here let me go and show you i'll go back to catalon.com and the first thing you will have to do is you will have to create a account so you can go to here sign in or start for free so this will take you to the sign up page so before that let us also look at the prerequisite and if you just search for catalon studio prerequisites this will take you to the page where you can see all the prerequisites that you need for catalon studio okay so here you can see we have catalan studio basic and then catalan studio enterprise which requires license and then catalon runtime engine which is used for command line execution and if you look at if you scroll down you can see the system requirements here so this is for windows the operating system that we need for windows then for mac and for linux and then you can see the cpu requirements and you can see the ram or memory requirements here and the hard disk so it says you should have at least 1gb of available disk space i will say that you must have at least 5 gb because we will be creating some projects as well and to make sure that your system does not slow down it's good to have at least 4 to 5 gb of free space and you can also see the browser supported and all the versions supported for mobile testing and everything all the prerequisites are here so you can check this page and if you are on windows just to check your operating system ram and all the other details you can go to you can go to this pc or my computer do a right click and go to properties and here you can see all the details so in my case you can see this is my operating system and then this is the processor i'm using the cpu the memory and this is 64-bit and you can always go and check your folders for the amount of space you have so you can see in my c drive i have uh 7 gb free in my d drive i have 1 gb free in my e drive i have 4 gb free so i can easily install and start using catalog studio if you are on mac you can just go to about this mac and here you can see about your mac processor memory everything you can find it here so you can check all the system requirements here so uh we have seen the system requirements and now let us start with so this is the link for system requirements that we just saw and now let us start with the steps to download and set up catalog studio step one is we go to catalon.com and then we create an account or we sign up so here on catalon.com you can click on sign in and in case you already have an account you can just give your email and password and sign in and if you do not have you can click on sign up here and here you can give your name you can give your email and create a password and then you can click on get started now when you create an account you will get a 30 days free trial of the enterprise catalon studio that is catalan studio enterprise let me also show you that as well if you go to catalon.com and you go to the pricing page here you can see here there is catalan studio which is free then we have catalan studio enterprise so you can see this is free but this is very limited so if you really want to you know work with catalog studio on your enterprise projects or company projects this may not be very useful because it is very limited and again if you want to do like ci cd and you want to run from command line for that also you will need runtime engine so this is catalon studio enterprise and this is runtime engine and you can see the different options for licenses but as you uh you can see the different features as well so here you can see web testing api testing mobile in desktop here we have all catalog studio features plus some extended features this is for ci cd and command line the runtime engine and you can also see all the links here you can always talk to the team as well but as you are starting you will get 30 days of free trial on catalog studio enterprise so you can create your account you will also get an email to verify your account and then you can click on sign in and sign into catalon studio and in my case i just have created an account with this temporary email i will give this email id and give my password and click on sign in okay now once you have signed in you can go to the download page or click on download and then you can download catalog studio and catalog runtime engine catalog runtime engine we will need later when we start doing command line runs but it's good that you keep these two folders downloaded and ready so this will download as a zipped folder so here if i go and search for you can just click here get started or you can directly go to catalonstudio.com download and here you can see it is downloading and it is downloading a zip file let me just cancel it for now i have a zipped file already downloaded but you can see here you can see all the steps as well the initial steps or if you directly go to dot catalogstudio.com forward slash download you can get to this page and here you can see catalon studio and catalon studio runtime engine and you can select the operating system by default it will select the operating system for you but just in case you want to change you can select it from here and click on download so download catalog studio and runtime engine this will get downloaded as a zip folder you can unzip and keep it at any location on your system so unzip the folders and keep at any location on your system and if i show you my folders i have kept these in my d drive tools catalon so you can see these are the two folders that will get downloaded you can after they have downloaded completely you can do a right click and say extract all and then extract or unzip at any location that you want to as of now i have extracted them here so you can see these two folders this is catalon studio folder and catalog studio runtime engine folder so this is step number six now step number seven is we will open the catalog studio folder and click on catalog.exe to start catalog studio so if i go to catalog studio folder and here is the catalog.exe on windows if you double click on this file it will start catalog studio and if you are on mac once you have downloaded and run the dmg file you can directly find your catalog studio in the applications folder so when you go to applications here you will find catalon studio here and then you can directly run it from here or you can start the spotlight by pressing command space bar on your keyboard that is command plus spacebar key and then you can start typing catalon and you will see catalog studio app and you can just click and start catalog studio so this is the the small difference between windows and mac and once catalog studio started rest of the things will be similar so i'm double clicking on the catalog.exe file and it will now start catalog studio so this is now getting started and we have got this catalan studio activation window so here you have to give the same email and the password that you used to create the account so give your email here and give the password and click on activate now just in case you get a window to create an organization or integrate with desktops uh if you like you can just close that window for now we will look at it later how do we integrate with desktops and all these other things we just have to activate our catalog studio now so yes this is done and you should be seeing a start page just in case you do not see the start page here so you can see this is a start page here if you do not find it you can always go to help and say start page and you will get the start page here it will show you the version of catalon studio you can see this is catalog studio enterprise 8.3.5 so as of now this is the latest version and here i can see a trial status which says 30 days remaining so we can use all the enterprise features for 30 days on this trial so this is what we have done we have started catalon studio now let me also start catalon studio on my mac system so there will be a very uh minor changes in the menu which i can show you okay so we have done this topic on download and setup of catalon studio now let us explore the gui and features of catalon studio okay so i hope all of you now have catalon studio uh ready on your systems and we can now explore the gui and features so here i have catalon studio ready on my windows operating system and here i have catalon studio on my mac operating system so i will show you wherever there are some differences uh mostly it is going to be the same and once you have catalan studio download and setup you can follow this session and this master class and you can work on windows or mac operating systems so now let me show you once you have catalog studio up and running you can see at the top we have this menu bar where you can see menu options like file action edit project debug window tools help etc so this is the top menu then we have got the main toolbar so this area that you see is called the main toolbar of catalog studio and here the options which are mostly used for the type of testing you are doing so whenever you create a project you will have a option to select whether it is a web project or an api project or a desktop project or a mobile project so based on the option you choose the options here on the main toolbar will get customized for that particular type of testing so this is the main toolbar here is the test explorer when you create your project you will see your project and all its files and folders in a tree view here and this is the editor where you will see the whenever you will select any file or anything from here from the test explorer its editor window will get opened here okay so you will see this here then you can see the log viewer the console here you can see all the logs here you can also see if you go to windows and say reset perspective so sometimes if you uh accidentally close some screens for example let us say i close the test explorer or minimize it now i want to get it back i want to go to the earlier view i can always go to window and say reset perspective and you can see it resets the perspective here okay then you can see there is a keyword keywords browser here you will see here on the left margin we have keywords browser where you can see all the keywords for the built-in keywords for web mobile cucumber web services and custom keywords etc so all this you will see here and now if you go to file you can see all these options now in my case a project is already created let me close the project so i can show you from scratch everything so i have closed the project and now you can see if i go to file we have option i can go to new and create a project here once the project is created you will also see all these other options will get activated like folder test case create a new test case create a new test suite create a collection so we can create all these new artifacts or items from here here is the option for new sample projects so there are some template projects some sample projects that you can look at and you can see some examples like there's an api project there's a bdd web ui visual testing android mobile testing ios mobile testing projects so you can take help from these projects in case you are doing any of these testings then in case you want to open any existing projects you can go from here open project and then all your recently opened projects will be shown here so in my case it is showing me some projects if you are using catalog studio for the first time you will not see any of the recent projects so which is fine and then we have option to quit from here if i go to mac and go to file you can see the same options here new new sample project and everything here then here is our action menu here you can see api web services open import etc spyweb spy mobile record web record mobile uh add keywords mobile and ui keywords we can run from here we can run we have all these options for running and then debug options are also here and then we have a advanced search okay so now before we go further and look at the different features and gui options let us create a project because once we create a project we will have all the options enabled so let's do that i will go to menu file menu and go to new and create a project so i will go to file and go to new and click on project and i will say this is training project and then we have options to select the type so we can select web api web services mobile desktop or generic so as i told you that when you select the type of the project on the main toolbar the main toolbar will get customized according to that type of testing so as of now we want to continue with the web testing so i will select web here then here we have some options do you want to start with a blank project or if you want you can also use the existing sample projects so as of now we want to start with a blank project in case you want to get the project from some repository you can give the url here we don't want that and then here is the location where you want to save your project so by default it goes in c users administrator catalog studio and if you are on mac and if you start to create a new project so if i go and start a new project here by default it goes into your users folder and catalog studio folder so here i want to change it i will click on browse and i want to keep it in my let me see which drive has more space i can go to my e drive you can keep it anywhere and projects and i already have a folder called catalon here if you want you can create a new folder or you can place it anywhere and i want to keep my project here so i will select this location and then we can give the description here which is optional if you want to give any description this is a demo training project you can give the description here and then here are two check boxes first one is to generate dot git ignore file now dot get ignored file will be useful when we put our project on a repository and we use git for source code management dot get ignore file will have the names or locations of the files or folders that we do not want to be put on the repository or we do not want to push to the remote repository and build.gradle file will be useful if you are using gradle but we are not we are not going to use gradle here we just need dot git ignore which we will uh look at later when we do source code management so i'll just check this and say ok and this will create the project and will open the project on catalon studios you can see the project is open and you can see the project structure here now just in case you want to see manually where is the project you can go to this menu project and say settings here you can see the project name and the project location so in my case it is here if i want i can manually go to this location on my folder so if i go to this catalog folder here are all my projects and this is the project and you can see all the folders here as well okay now project settings is something we will look into more details as we go through these sessions i will cancel it as of now and also if you go to project and go to settings and if you go to explorer here you can here you can check what all folders do you want to see in the explorer window here so just in case if you do not want to see some of the folders you can always uncheck it from here so as of now i will keep it as it is and we have got our project created so now you can see all these options we have file we have action uh here you can also do an advanced search on your project then we have edit for undo and redo then we have project you can do a refresh from here which will refresh the project or if you want you can close the project and you can close and clean up cleanup will also you know delete some unused objects or other things so you can do that now if you go to project settings this will be very useful and we will use it frequently we have all the project settings here and these are the project settings not the catalog global settings if you want to go to the global settings of catalog studio you can go to window and go to catalog studio preferences so these are the global settings of catalon studio in case you are on mac you will find this under the uh you will not find it under here under window but you will find it under catalog studio and here we have preferences so these are the global settings for catalog studio but your project specific settings will be under project and settings here you can see integrations you can see plugins desktops test cloud project information test design which will have further web ui test case library management email execution management desired capabilities database network self-healing so we will look at some of these as we go through these sessions then we have debug whenever we have to troubleshoot or debug our test cases we can go to the debug perspective you can also see the debug perspective here generally we have we work in keyword perspective we have two perspectives keyword and debug generally we work here but when we have to debug we can use this debug perspective i will show you when we learn about troubleshooting and debugging then this is desktops it will directly take you to the catalog desktops and if you have to integrate with desktops you can do it from here and as of now we will see it later we have other integrations like for alm we have integrations with jira q test test trail for ci cd we have integrations with jenkins bamboo and all this will take you to the documentation page where you can see how exactly you can do the integrations so as of now we will skip this and we will move to the window window we have reset perspective which we have already seen then we have command palette which you can start from here or you can press ctrl alt c key on your keyboard and this command palette you can actually uh start typing anything let's say i start open and all the matching options or functionalities will be listed out so you can see open check point open test case open test data open test object open test suite similarly i want to if i say test case everything matching with test case comes up so this can be very handy especially for beginners if you want to check what are the options available for some particular functionality you can always go here in the command palette and you can start typing and see the options then we have themes we have a light theme and a dark theme so if you want to use a dark theme you can you know go to the dark theme and i think for us the light team is good so i will move back to the light team then we have catalan studio preferences as i showed you these are the global settings and you can see the settings for git mobile plugins proxy so in case you are using any proxy on your servers or in your network you can always check the proxy here so all these global settings for catalog studio are here you can also check the general appearance um cucumber groovy and you may in case you have used eclipse you may find some of these options similar to eclipse because uh catalan studio is created on the eclipse platform for the structure and design you can also find this if you go to the catalon studio folder where you have downloaded the folder so in case i show you this folder here you will see this eclipse.exe file as well so you can see some similarities with eclipse ide here then we have tools we have plugins you can install a plugin uninstaller plugin from here if you want to update all the web drivers or the browser drivers you can do it from here we have option to terminate the running web drivers we have a utility to export and import test artifacts so in case you want to import or export within projects or give it to somebody else you can do it from here we have some ios options this is for desktop vin app drivers if you want to show all the unused test objects that is the objects which are added to the project but not used in any of the test cases you can see it here then we have the help menu in the help menu if you go to about it will show you the information about your catalog studio the version the build etc then if you go to quick start card it will take you to the documentation and you can see all the different options it will take you to the documentation pages and you can see all this uh we have the start page which takes you to the start page then we have if you want to report a issue you can see a error logs you can see all the tutorials here these are links to the tutorials we have encrypt text i will show you this later what is this used for and check for updates so this is the top menu here then we have the main toolbar as i told you this is the main toolbar and because this is a web project it is customized for our web testing here we have options to save and save all there is a this is aptly tools for visual validation this is a third party tool which is integrated with catalog studio this is for gate again this is integra there is an integration with gate this is for self healing this is the spy web so here if you want to spy the objects or capture objects from a web page you can use this this is catalon recorder or record web so whenever you want to record a test you can use this similarly we have spy and record for mobile and spy and record for desktop then here is uh back and forward buttons this is for command line build cmd this is to run a test case as of now this is disabled because we do not have any test case this is to debug a test case again this is disabled and to stop a test case when a test is running this will get enabled and you can stop it from here these are links for catalon test cloud and catalog desktops here we have this is for execution profiles i will show you this later when we come to the topic these are the two perspectives keyword and debug we work on the in the in the keyword perspective and whenever we have to troubleshoot and debug we go to the debug perspective okay then here you know some links and then some notifications here and this is your profile if you go here you can see uh your login profile you can go to your dashboard you can look at what are the plugins you have and you can log out from here as well okay and this is the test explorer where you can see your project in a tree view this is the editor window so whenever you will select anything from the test explorer it will get opened in the editor window here this is the keywords browser here we have some tabs like problems console log viewer etc so this is the gui of catalog studio so we have done all these steps we have created a project we have looked at all the features and the gui we have looked at some settings and preferences so we have completed this topic okay so i hope uh now you have a good understanding about the platform and do not worry uh as we uh create the test cases as we look at all the other options you will get to know all the features all the options on catalog studio but at this point i believe you are good with the basic information you have downloaded you have open catalog studio you have created a project and you know some of the options and features of catalog studio now we will start creating our automation tests so now we will see how to create automation tests in catalog studio and we will look at the different ways to create automation tests so step number one here is create a new test case now to create a new test case you can go to file new test case so i can go here file and i will go to new and here you will find the option test case and this will get this will be enabled only when you have a project you have opened a project or you have created a project so you can go from here you can create a test case from here or the other option is you can directly go to the test explorer and go to the test cases folder do a right click say new test case so here you can directly go to the test cases folder on your test explorer and here when you go here you can do a right click and say new and we have option to create a test case and we also have an option to create a folder so in case you want to categorize your test cases and keep it in different folders uh based on any of the logics that you have maybe based on the product may be based on the web pages maybe based on the the type of tests like smoke tests regression tests sanitary tests you can do that so let me create a folder here and i'm just going to give the name as demo tests and now i will again do a right click on this folder demo tests and i will now create a new test case i will call this as test 1 and the first way of creating a test case that we are going to see is how to create a test by recording so i will call this as test one underscore record mode and description and tags are optional so if you want you can give some description here this is a demo test case and if you want you can give some tags like i can say at smoke at sanity etc so text will be useful when you want to search for a test case or when you want to execute based on text you can do that so these are these two things are optional description and text and say okay and you will see the test case is created here okay so this is how we create a test case we give the test case name and then click on ok and we have got our test case created now we will look at the modes of test creation in catalon studio we have three modes we can create a test by recording we can create a test by manually adding the steps and we can create a test by scripting so these are the three modes so let us look at these modes first we will look at the recording mode so in the recording mode step number one is we will first go to the main toolbar and click on web recorder and you should already have our test case created and now i will go to the main toolbar and here you can see there is a record web icon here so this is the one we will use so click on this record web and here this will open this web recorder window here you have to give the url of the application that you want to test and then here you will see a record button and there is a drop down here so give the url and by default you will see there is a demo catalog application url already added which is demoat.catalon.com so we will continue with this for now and here in this drop down you can see the browsers that you can use for recording chrome is recommended so this is what we are going to use so click on this and it will start the chrome browser and also go to the demo application now if you click on this expand button it will show you all the recorded steps so you will see all your steps getting recorded here as of now it has recorded open browser and navigate to url which is this url now if you go to your application you will see wherever you are taking your cursor it is highlighting the objects so this is make appointment button i will highlight this and click and you can see it has recorded the click action on make appointment button now we have got this login page here we have username and password so i will click on the username and give the username which is john doe you can see the username and passwords here and it has recorded now i will also give the password so this is the password which is this is not a password i'll just copy and paste it here and you can see it has recorded this password and then click on login here we have some other objects this is a drop down i will select from the drop down a check box a radio button uh this is a date field you can see all these are getting recorded here and then a comment box i will say this is a demo comment and finally we have a button to book appointment i will click this and we have got the appointment confirmation now if i want to uh verify that we have got this appointment confirmation message i will highlight this text and do a right click and you will see there is an option called catalon studio when you do a right click and here we have the option verify element text i will select this and you will see this option is also recorded now at this time if you do not stop the recording so we have got this pause and stop recording buttons here but i will not click on stop as of now once you click on stop it will close this browser window so before closing that if you see there is a you can see all your recorded steps here and then you can see there is a link to show captured objects so all the objects that we have uh captured or worked with during this session like clicking on any buttons any uh adding any text all these are objects all the buttons text everything that you see on the browser are objects so all the objects that we have captured during this session you can find it here if you click here show captured objects it will open this captured objects and you can see all your objects that you have worked with and you can select any of the objects and you can also see the object properties what is the selection method used and this is a selective used you can also check the attributes the css etc of that object and then you can also see here we have got a verify and highlight button so in case i click on this verify and highlight if that web page is open here it will highlight and you can see this message found one element using the using this xpath selector so i will again say verify and highlight and you can see it is highlighting this on the web page suppose i go to some other object which is not present on the web page let us say the password box and if i click on verify and highlight you can see it says unable to find the object by this x path because it is not here so for that uh in case i will pause the recording so that it does not record any of the steps and in case i log out from the application and i click on make appointment again and now i am on the login page so now if i click on verify and highlight you can see it is highlighting the password object and here it is saying found one element using the expat selector so you can also check this if you want to and i will click on hide objects and then i will say i will stop the recording by clicking on this stop recording button and as i stop the recording it will close the browser and also uh it will capture close browser action but because we had already paused the recording therefore did not capture that but that's fine we can add it manually as well i will click on save script here and this will show you all the objects recorded during this session in case you have accidentally recorded any objects you can always uncheck it from here before saving so if you want you can uncheck the objects as of now everything is checked and all of this will go in the object repository folder which is this folder here so i will say ok and you can see the test is created we have got all the steps created in our test case if we check the object repository folder all our objects have come here and our test is now ready and now i can run the test so we have done all these steps we have added the url on the recorder window we recorded the steps we stopped the recording we saved the steps and now we can execute or run the test and check the execution so to run the test we have got this run button here now if you directly click on the run button it will run on the default browser the default browser is set on the project settings and execution so you can see the default execution browser is set to chrome so if you directly click on this button it will run on chrome browser but if you want to use any other browser you can click on this drop down and you can select any other browser as of now i'll just click here and let us see the execution on chrome browser you can also see the job progress here and the logs so it goes to the application enters username enters password logs in and it is doing all the actions and it checks the appointment confirmation and everything is running fine if you want to see the log viewer you can double click here to expand and you can see all the logs so this is a tree view of the logs here you can click on any of the step and see the details here if you want to disable the tree view and look at a tabular view of the logs you can go here you can see here it says preview you can click here it will disable tree view and you can see the tabular view here so you can again click on any of the step and you can see the details and you can also filter from here if you want to see all the logs or only the past and failed you can filter from here okay so this is how we can create our test using our recording mode now let us see the manual mode now in the manual mode we first have to all the objects that we will be using in our testing or all the objects that we will be working with in our test cases we have to first capture all the objects so for doing that we have to click on spy web so you can see here let me collapse the log viewer and here you can see here we have got the spy web so this is the option click here and it will open the object spy window and it looks uh looks similar to the web recorder window we give a url here and then we select the browser the default browser is chrome so here let us do our testing on this orange hrm demo website so this is the link i will give all these links and notes in the description of this video so this is if i just show you the link this is open source hyphen demo dot orange hrmlife.com this is the application i'm using and just in case at your time if this is not working if this is down you can use any web application any demo or any web application that you can use for your testing you can use that so give the url here and then just click on start and this will start the browser and will go to the application now again you can see wherever i am taking my cursor it is highlighting the objects and you can also see on the top it says to capture the objects you have to press alt and the backtick key on your keyboard this key is on your top left of the keyboard just below the escape key so you you have to highlight the object and then press the key combination and you can also change these hotkeys or key combination i will show you that later so you can use this way or the other way is you can do a right click on the object so once you highlight the object you can do a right click and you can click on capture object so when i do this you can see the object is captured here so these are the ways we have to we can capture the objects by doing a right click and then select capture object or we can hover over the object and once it is highlighted we can press the key combination or we can click on the object once it is highlighted and then press the key combination or we can click and keep the mouse pressed on the object and then press the key combination so any of these will work the most easiest and straightforward way is you just do a right click on the object and then select capture object so we have done that and now the object is captured if you click on the object here in the objects file window you can see the object properties so you can see this is the object name which will be saved in the object repository if you want you can change this here then the selection method used is xpath and these are the x parts captured and out of these the x path which is used to find the object which is the primary locator is this one and again we have options to verify and highlight you can click here verify and highlight so we have captured the object for username box then again i will go to password and do a right click and capture object it is captured here then the login button right click and capture object now i want to go to the next page so for that i will manually login to this application and here you can see we have got the username and password admin and admin 123 so i will add the username add the password and click on login and let me see if it is not working at this time i'll click here okay so this is not uh the application may be down or this is not working so that's fine until now i have captured username password and login button so if you want to go to the next page and capture more objects you can always manually login and then it will go to the next page and you can do the same options other the same actions here uh the same actions there that is right click on the object and click on capture objects so as of now let us continue with these three objects we can at least create a login test with these three objects so once you have captured you can click on save here and you can again see all the objects which will get saved in case you want to uh do you do not want any object to save in the object repository you can always uncheck it from here and then i'll click on ok and now you can close the object spy it will also close the browser window you can go and check in the object repository we have got this page orange hrm folder and we have got these three objects created here now we have captured all our objects and all the objects are there in the object repository now we will create a new test so i will go to the test cases folder demo tests folder i will create a new test case and i will call it as test 2 underscore manual mode you can give any name to your test case description and text are optional so i will leave these blank and say okay and i have got the test created this is the editor window of test2 now we will add the steps and the objects to the test case and because this is a manual mode we have to manually add the steps one by one so the first step is we have to open the browser so for that we have to add a keyword to open the browser and for that i will go to the keywords browser so if you check the left margin here the extreme left of catalon studio you will see this keywords browser icon you can go here and it opens the keywords browser here we have built-in keywords we have custom keywords and utils i will go to built-in keywords and this is the folder for web ui keywords i will go here and here you can see all the folders so all the keywords are arranged in there in these folders so it is easy for us to find out the keywords now open browser is a keyword related to browser so if i go and check this browser folder and expand it you can see all the browser related keywords here and here we have this keyword open browser so when you hover over the keyword you can also see some details and here is a information icon which will take you to the documentation page of this keyword so as of now i just want to add this keyword in my test case so there are two ways to add the keyword i can click on this open browser drag and drop into my test case so i will drag and drop it here and we have got the keyword added the other way is i can click on this add button and this will create a new step and you can see here this adds all the keywords in a drop down so we can either select from here or if i start typing i start typing open and you can see all the matching keywords are listed out and i can select open browser from here and if you click on this add button directly it will add all the web ui keywords by default but if you want any other keywords you can click on this drop down and select any other keywords as well so you can also add the keywords like this as of now i will delete the step number two so we have got open browser after opening the browser we have to navigate to the application url so let me search for the keyword i will again go to keywords browser and go to web ui keywords and browser folder and we have a keyword called navigate to url so i can again drag and drop it like this or the other way is i can directly go to the test case click on this add drop down select web ui keyword and i will start typing navigate and i have got this navigate to url now in case of navigate to url we also need to give the url here so in the input column we will give the url of the application so i'll copy the url and i will double click on this cell of the input column and here the value type is string and the value i will again double click and give the url here and say ok and we have got the url added so this is our step number two now after going to the login page we need to set our username in the username box or type a username in the username box and type the password in the password box and for that if i again go to keywords browser and this time i will go to web ui keywords folder and i will go to text because that is a text we are writing and here we have a keyword called set text this is what we need i will drag and drop it here now set text also needs objects so we need to pro we need to uh inform on what objects on what object do we want to set the text so here i have to select the object from the object repository so you can again go to your object repository and the object that you need you can either drag and drop it like this or you can just double click here double click here and it will open the object repository and you can select the object from here as well so the object is added and then for the input we need to provide the username so i will say username is admin again i have to enter password so again i will go to add web ui keyword and say set text and use the password object i will drag and drop it here and the password i will use here admin 123 and say ok now in case of password or in case of any sensitive data if you want to mask or encrypt it you can use the keyword set encrypted text here so instead of set text if i say set encrypted text we have got this keyword here and in this case we can give the encrypted value of this password so if i double click here on this password and again if i double click on the value you can see i'm automatically getting this option to encrypt my text so i will say the text i want to encrypt is admin 123 and this is the encrypted text i will say insert and ok and you can see the password is now encrypted in case you do not directly get the option to encrypt the text you can always go to help the help menu here and here we have got an option to encrypt text go here and again if you want you can encrypt and copy the encrypted value from here so we have entered username we have entered password now we have to click on the login button if i go to the keywords browser and now if i go to under web ui keywords folder if i go to element you can see we have got a click keyword this is what we want so i will just drag and drop it here and in case of click we just need the object we don't need any data so the object is this input or the login button so i'll drag and drop it here and finally after logging in i want to close the browser so i will again use a keyword close browser and that's it and i will save so you can see this is these are the buttons to save i will click on save all so everything is saved and we have done all the steps now we can run and verify so i will go to the run button and click on run and this will start execution on the chrome browser so let us see the execution it opens the chrome browser goes to the application and this username enters password clicks on login and it was it is passed you can see all the logs it it passed but it was like very fast in case you want to slow down you can either add delay keywords so i can just add a delay like this there is a keyword called delay and i can say how many seconds do i want to delay let's say two seconds or if you want to add a delay for every step suppose you want to watch the execution and you want it to go slower than what it is now you can go to project settings and go to execution and here if i go to web ui you can see here delay between actions so if i say i want a delay of one second between every action so there will be a delay now and let me try to save the test and i will run it again and this time let us see the execution so it opens the browser goes to the application and you can see it is slower now it enters username it enters password clicks on login and then it will close the browser so this is working and this is how we can create our test in manual mode okay so now let us move to the scripting mode and as the name suggests we will create our test cases by scripting and here step number one is we will again spy all the objects we will capture all the objects that we want to use during our test and we have already done this in the earlier topic of manual mode so let's say let's imagine i want to do a testing again on the same application that is orange hrm i want to capture or automate a login test so for that i have already captured the objects here so the this is exactly same as per the earlier topic we can open object spy and then we can go to the url and then capture the objects by any of these methods and then save the objects and all the objects will get saved in the object repository after this we will create a new test case so i'll just go to my test cases folder demo test folder and create a new test case i will call this as test 3 underscore script mode and say okay and we have got the test editor open here and now step number two is we will go to the script tab or the script section of the test case so you can see once you open your test case you will see there is a script tab here go here click on this and you will see this is a editor where you can script and you can see some import statements here which are collapsed if you click on this plus button it will expand and you can see all the import statements i will collapse them again and then from here you can start typing your script so in script mode we will create script for every step and for this we use the class web ui now web ui is a class in catalon studio which contains all the web ui keywords so all the keywords that we have seen here under web ui folder under this web ui keyword folder all this what we have seen all these keywords are present in a class called web ui and using this class web ui we can access all the methods or all these keyword functions and here cases are important so you can see this is web ui where w is in caps then e and b in lower case and then ui is again in upper case so this is important you have to write it as it is and let me also increase the font i'm pressing ctrl and plus key on your on my keyboard if you're on mac you can press command and plus key or control minus will make it smaller or decrease the font and control plus will increase the font so we say web ui and i say dot and when i say dot you will see it will show us all the keyword methods in case you do not see this auto suggestion box after pressing dot after adding dot you can press control space bar on your keyboard that is control plus space key and you will see this auto suggestion now the first step is i have to open the browser so i will start typing open and you can see all the keywords or all the functions related to open are here i'll just use this open browser and here let me scroll down in the brackets i will give an empty single quote next step is i will again say web ui dot and this time the keyword is navigate to url so i will say navigate and i have got this navigator url i will click this and within quotes inside the brackets i will give the url which is the url of the application i can give like this you can also expand this test editor by just double clicking on this test if i double click it will get expanded you can keep on saving as well you can press ctrl s or click on this save all button so that you do not lose any of your data next step is after going to the login page i have to enter the username and password and for that we have set text so if i start typing set text i get this function set text and if you remember for set text we need the object as well as the data that is the input value so for the data i will give the username which is admin one two three you have to give this in quotes you can use double quotes as well and for the object you can i will double click on this tab so that it comes back to its original position so for the test object you can remove this find test object and here this is the object we need so i can just drag and drop it here make sure that the cursor comes between the bracket and the comma and you can just drag and drop it like this now in case it does not work in my case it is not working maybe i can try by you know restarting catalog studio but still if it does not work you can manually also add it you can say find test object if i press control space bar on my keyboard you can see we have got this fine test object function and in the bracket of this function we have to give the relative id of the object so this is my object i will do a right click and say copy id copy id will copy the relative location and within quotes i will paste the id of this object so whatever you have copied it will get pasted here let me expand and show you this is how it looks like now okay so this is how you can do it in case drag and drop does not work you can do it like this then i will have to add the password i will say set text again and here if you want you can also say set encrypted text for password and you have to give the encrypted value of the password which is admin 123 for that i will go to help and say encrypt text i will say admin 123 and i will give it here and for the object i will again say find test object control spacebar to bring up the auto suggestion box select this and within the course i will give the relative id of the object so this is the object i will do a right click copy id and paste it here and then the next step is i will say web ui dot the action is click to click on the login button and for click we just need the object so i will say uh let me again check the function this is click with the object this is the one and i will say i'll use the function find test object and give the relative id of the object within codes in the brackets of the function so this is my object in the object repository i will right click copy id and add it here and then next step is i will just say webui dot close browser and that's it save your project and we have got all the steps scripted and now so this is how we have done this we have used a web ui class and then we have saved the project and now we will run it so i'll click on the run button here uh so it says there are some errors in the script so sometimes it may happen that at the end of your script you can see some symbol like in my case it is a close curly bracket edit so make sure that you don't have anything here you have a clean script and save and run again and let us see the execution so it opens the browser and goes to the application and it enters the username enters the password and clicks on the login button uh let me check the username i have given uh it should be admin not admin 123. let me save this and run again and it opens the browser enters the username enters the password and clicks on the login button so this is working fine and with this we have completed all the three modes of test creation in catalon studio now if you if you look at this script mode if you look at the script here and if you go back to the manual mode here so let me show you if i go here to the manual mode you will see these are the same steps as we have created earlier while we were doing a recording or while we created the test in a manual mode so if you look at your manual mode test case and you look at the script mode test case and you look at the manual tab you will see these are looking exactly how we have done in the manual mode and that is that means that whether you create your test in a manual mode or in recording or in script mode they will get created in all the modes and you can see them in a in a tabular format like in the manual mode and you can watch or you can see them in a script mode as well that means if i go to the first test case that we created using the record mode and if i go to the script mode of this test case you can see you can check all these scripts here so now you can understand these scripts because we have learned the script mode we know how these scripts are created and this will be very handy for you when you work with catalog studio you will know how you can create the test in a script mode if you have to do any changes any updates in a script mode or in a manual mode you can do that now idd generally whenever we have to create a test we can use the recording mode using the recording mode you can very quickly create all the test cases and then after that after you have created your test using the recording mode you can update it using the script mode or the manual mode whenever required so you can now use a combination of all the three modes to create your test case and we have learned all these three modes in catalog studio okay so now we will look at test suite in catalon studio we will see what's a test suite how to create a test suite and some of its features and how do we execute a test suite so test suite as the name suggests is a collection of test cases so we can group our test cases in our test suite and let us look at the steps we will create a new test suite and to create a test suite you can go to your project let me close all these tabs so here we can go to file and go to new and we have an option to create a test suite here or we can directly go to the test explorer here and we have got a folder called test suites and if you do a right click here you can go to new and again we have got a folder if you want to put your suites in different folders you can do that or you can directly go and create a test suite so i will select test suite and you can give some name i will say this is test suite 1 and description is optional i will say ok so we have got this test suite created and opened and then we will add some test cases to our test suite so you can click on this add button and here you can select the test cases let us i will say i'll select this record mode test 1 and test 3 script mode so this will show you all your test cases in this project and you can select and i will say ok and the test cases are added here now here it will show you the id of the test case the description in case it has and then here is a run column so you can actually select which tests to run if you uncheck the test from here it will not get executed so you can select it from here and then you will see the execution information section if you expand this you can give a timeout so if you want to provide a specific timeout for this particular test suite you can give it here or when you say use default it will use the default timeout set in the project settings so if i go to project and go to settings and if i go to execution you can see the timeout is 30 seconds let me change it let me put it for a lower value like 7 seconds and that is fine also if you go to execution and go to web ui execution you can also see here default page load timeout by default it is wait until the page is loaded but if you want to set some time out you can also set it here and i will say apply and close i don't want to put any delay between actions so let me just remove this i'll say apply and close and then here we have retry failed executions immediately so in case uh any of the tests any of the steps fails during the execution of this test suite if you want to retry the failed test case immediately you can give the count here how many times do you want to retry so as of this setting it will retry immediately after uh after the after failure for a maximum of three attempts and if you want to retry only after all the test cases of this suite are executed you can select this and you can also give the number of times you want to retry and if you only want to when you are retrying after executing all the test cases if you only want to retry the failed executions you can select this this option is here because sometimes the test cases are dependent on each other so you may want to retry all so that's why it is here for now i don't want to retry after failure so i'll just keep zero here and here we have uh we can give the email recipients email ids if you want to send the report of this test suite to any of the stakeholders you can give your you can give the email ids here and before you give that uh you will also have to do the settings for email in project settings so project settings here we have the email settings so you can do that for now i'll just skip this one and these are the execution information and once you have done all this you can save your project and then we can run it so we have done all these steps we have created a test suite added the test cases we have uh checked the test case for execution so you can see we have checked all the test cases here and then we have updated the execution information section and now we will save and run so i have saved and i will click on the run button and it will start the execution of the test suite and it will run both our test cases that is test one record mode and test three script mode so it is now running the first test case and it is running this on the catalon demo website and this is pass it will now run the second test case which is the login test on orange hrm and everything is running fine and this is all done and this is how we can create and run a test suite now we also have test suite collection and test suite collection as the name suggests is a collection of test suites so this is a collection of test suites and step number one here is we will create a new test suite collection so i will go to the test suites folder again you can go to file and go to new and you can find our option here to create a new test suite collection or you can directly go to the test suites folder here and do a right click and go to new and we will have our option test suite collection so you can give any name i will say test suite collection 1 description and tags are optional and say ok and we have got the test suite collection created and these are the two options as i showed you to create a test suite collection and then step number two is we will add the test suites to this collection so i will click on the add button here and it will show you all the test suites which are present in your project as of now i have a single test suite so i will select this and i will say ok and it has it is added here again you can see there is a run column you can check or uncheck if you don't want to run a particular test suite from the list of test suites you can uncheck it from here so we have done this now again we have to set up the execution information you can see there is a execution information here now for for the particular test suite let's say uh this particular test suite that we have selected whatever you have whatever you have added or updated in the execution information section of that test suite that will run as it is whatever you have added here in case you have added any time out or retry or email recipients it will all all be taken care it will all be considered but apart from that there are some other execution settings for a collection and that is the execution mode if you want to run all the test suites in this collection in a sequential mode that is one after the other you can select sequential or if you want to run in a parallel mode that is all the test suites or multiple test suites in parallel at the same time you can select parallel if you are selecting parallel you can also specify how many concurrent instances do you want like how many parallel runs or how many suites will be running at the same time you can select this now this uh will also depend on your infrastructure on your hardware uh if your hardware does not support many concurrent runs it can slow down so based on that you can select this uh generally five or eight should be fine and if you want to add any delay between instances then you can add the delay here so let me do one thing i will click on add again and i will add the same test suite once more so you can add the same test suite multiple times in a test with collection and the same goes for a test suite if you want you can add the same test case multiple times in a test suite so you can do this and here also i have added the same test suite multiple times here one more advantage is you can select the browser that you want to run with so let's say i want to run this test suite once on a firefox browser so i will select firefox here and once with a chrome browser so i can test on both the browsers and we also have run configuration which is mostly used in mobile testing so i will leave it profile we will learn later so you can also select different profiles which will help us in running this on multiple environments so that we will learn later as of now i have selected firefox and chrome and if you want a delay between instances i can set some delay let's say three seconds and i will run parallel and anyways we have two test suites so i will select max concrete instances as 2 so i will save and we have done all these steps and we can now save and run so i will save and now to run you can see we don't have this run button it is disabled to run our test suite collection we use this execute button here so i will click on execute and it will start execution and let's see the execution it has started and it will run the test feed on two browsers at the same time that is in parallel you can always check the logs so you can see if you double click on the log viewer you can see the live logs here so as of now it is starting the chrome as well as the firefox browser so this is firefox and this is chrome so you can see it is running simultaneously on a firefox browser here and on a chrome browser here so these are the two browsers it is running in parallel on both the browsers so the first test is completed on both the browsers now it is it will start the second test case you can see here this is on chrome and this is on firefox so this is also done let me go back and yes this is done both the browsers and if i check the logs you can see everything is running fine so all the steps are completed on both the browsers so this is how we can create and run test suite collections and as i have told you the run configuration is to add some extra information to execute with the selected environment for example if you want to select a mobile device to be executed for android environments that is what i was talking to you about the run configuration and profile we will look at it later when we learn about environments and how to run on multiple environments so this is how we can use we can create and run test suite collections okay so now let us move to logs and reporting or reports now in case of logs and reports in catalon studio you will see logs are generated for every execution whether it is a test case or a test suite or a test suite collection you will see logs are generated so if you see this is the log viewer here so whenever you run a test case or a suite or a collection you will see logs coming here however reports gets generated only for test suite and test suite collection execution and not for test cases so we have logs for test cases and reports logs for all the executions test cases test suite or test with collection and reports for test suite and test suite collection and not for test cases so you can see here it is mentioned logs for everything all the executions but reports only for test we can test with collections and this is because uh test case uh an individual test cases look like so if you see here the test cases folder here we create our test cases so this look like a place where you can create you can run and check you the execution is fine and all all the test creation you can do but ultimately you will be adding these test cases in a suite and then the suite if you want you can add to a collection when you when we will learn command line execution there as well we have option to run from command line only for test suite and test suite collection and not for individual test cases so that is why the reports also gets generated only for sweden collection and not for individual test cases so here let us see the steps so let me show you let me show you the reports first so we know the logs gets generated here in the log viewer and you can see these earlier logs and we also know this is the tree view and you can select any of the step and you can see the details here and if you go here and disable the tree view from here you can see the tabular view here you can also filter the past failed information warnings all these you can filter from here now for reports you can go to project and settings and you will go to plugins and you will find a option for report now earlier report used to come as a separate plugin for catalog studio and user had to get the plugin install the plugin in his or her account and then had the plugin here and then use the report reports or reporting feature but now it comes in build you do not have to separately get the reports plugin so if you are using catalog studio enterprise you will see the report plugin already added and here we have option to select the format of the reports so if you want csv html pdf whatever reporting formats you want you can select from here and then apply and close and then you will also see there is a folder called reports here so in your test explorer you will see a reports folder and if you expand this it will show you report reports for the test suite or collection executions that you have done in your project so if you see this is the report for my test suite execution if i open this it shows me the test cases it shows me the status pass or fail and here at the bottom if i see here you can see the summary which shows me the test suite id hostname catalog version start time and time total test case pass field etc operating system platform etc then if i go to the execution settings you can see all the settings that were there at the time of running this test suite are here it will show you the timeout settings proxy settings all these details if you go to execution environment here you can see settings for you can see information for host operating system catalog washer version browser browser version selenium version etc all this information is here and then here you can see all the test cases of this test suite along with the time taken and the status at the top we have a filter if you just want to look at the only the past only the failed error incomplete etc you can look at it here and then here we have a option to show test case details so if you click here let me bring it down and if you click here your test case details and select the test case from here you can see all the details all the steps of that particular test case you can also expand and see all the details of that step again we have these filters here if you only want to see the failed past all these options are here and when you select any of the step all its details are also shown here at the bottom of the screen so this is how you can see the uh details and the reports results within catalog studio and if you want to see it outside like in a html file or a pdf you can go to the reports folder or you can do a right click on this report and say export as and we have got these options so you can say here export as and you can export it as a html csv pdf etc or you can just right click and say open containing folder so this will go to the physical folder on your system so if you see this is your project folder under that we have reports folder so this is our project folder then we have the reports folder here and they see these are the reports folders this is our test suite and here you can see all the reports we have got a html report here you can see the details of the execution environment the test suite details information about the test suite what is the name of the test suite the status the time taken pass field test cases then for every test case you can see all the details all the steps details time taken by the test case status of the test case pass fail etc in case there is a failure you will also see the locks and a screenshot as well and then you can see other formats as well so there is a pdf format there is a csv format if you see the csv format you will see in a tabular view all the test cases and all the test steps with their status time taken duration in case there is any error you will see that here as well all these details you will see here and then we have the pdf as well so as of now you cannot see the pdf because i changed the settings to include the pdf after this report was generated so from now onwards you will also get a pdf format as well and in case you want to see a pdf i can always do a right click here and say export as pdf and i can select where i want to save this let us just go on the desktop and save it so if i see uh let me see where it went yeah it is here so this is the pdf and you can see the pdf again you can see all the information all the details about the test suite the test cases time taken pass field all the step details everything is here now in case there is any failure let me show you one example with a failure i will go to my test case let me just go to my test case with script mode and here i am just adding a step click and i will use an object which is not present i am going to use an object from a different application let us say this uh catalog demo application so this will fail here because this object it will not find here i will save and go to my test suite that is test suite 1 and i will run the test i'll just stop it i think i added this two times so i don't want to waste time in running the same test again i will uncheck this we are running these two tests and i will save and run it and let us see the execution and then we will check the reports so this has started the execution it is now running the first test case which should pass and yes this is fine now the second test case which should fail so after this it will try to find the login button which is not present here which is a login button of a different application and therefore it will fail and you can see in the logs it has failed and now if i try to check the reports if i go to the reports folder and refresh and if i see this report you can see this has failed and if i check the files i will right click and say open containing folder and now if i see the report you can see we have got a pdf as well here here it says it has failed if i expand this you can see this test has failed and now if i check the failed test case you can see the failed step and also we have got the message information unable to click on this particular object so it is very intuitive we get all the information if i look at the failed step you can see all the details here it was unable to find this object by this particular x path and then it has also taken a screenshot of the page and attached attached the screenshot in the report so this is how the report will get generated whenever there is a failure if i check the pdf again you can see this is a pdf and these are all the details on the pdf here as well you can see the screenshot is attached along with the error logs so this is how we can look at the logs and reports okay so now let us move to the next topic which is custom keywords we will see what are custom keywords and how do we create custom keywords in catalon studio now in catalog studio we have built-in keywords and then we have custom keywords now built-in keywords as the name suggests are the keywords which are already present which are built in the platform and you can directly use them and here if i go to the keywords browser on catalon studio and you can see we have got the built-in keywords folder here and inside these folders all the keywords that you see under web ui or under mobile or under web services all these are built-in keywords they are already present these comes as a standard keyword set in catalon studio and you can directly use them in any of your test cases now sometimes it may happen that you are trying to do something very custom so generally whatever you are doing on a web browser if if you talk about web testing whatever you do on a web browser like clicking or setting a text or dragging and dropping or upload download a file or you know any kind of action that you may be doing generally all these are already present as a built-in keywords but sometimes maybe you are trying to do something very custom based on your scenario or application and you do not find a direct keyword for that in that case you can script and create your own keywords and these will be uh these will be called as custom keywords so these are not present built in in catalog studio these are custom keywords or we can also say these are user defined keywords because the user is creating these keywords sometimes you may also want to club multiple actions or multiple keywords together let's say you are doing a login uh action and you want that every time instead of adding all these three or four steps separately that is enter username enter password click on login button you just want to club all these actions in a single keyword even then you can create a custom keyword and you can add all these steps within that keyword so whenever you want to do login you just have to call that single custom keywords so let us now see how we can create custom keywords step number one is we will create a new custom keyword and for that you can go to file and go to new and go to keyword so here let me close all these collapse this so i can go to file and new and we have a option for keyword here or the other way is i can directly go to the test explorer and go to the keywords folder do a right click and say new keyword so here in the test explorer we have got a keywords folder i will go here and i can do a right click and i can say new keyword and here there is a package name if you want to store this under a package you can consider package as a folder so just in case you want to you know categorize your keywords into different folders or packages you can give a name here otherwise if you leave it blank it will go in the default package then you have to give the class name so we are actually creating a creating a class and in that class we will be creating the keyword functions so i will call this as my keywords and we have option to generate some sample keywords just in case you want to look at some sample keywords you can check these there are sample keywords for web mobile and api you can check and look at these sample keywords for now i will leave it as it is and say okay and you will see under the default package this my keywords class is created this is a groovy class groovy is the language we use for coding in catalon studio and you can see some import statements are already added you can collapse these import statements so i'll just collapse these and you can see the class by the name my keywords is created here so this is the start of the class this is the end of the class okay so we have done step number one step number two and now in the class inside the class we can create our functions so here let us say i will create a very simple function in groovy to create a function we say def which is a keyword which is our inbuilt keyword in groovy and i'll just give the function name let's say hello you can press ctrl plus to increase the font so this is going to be the name of the function and then i give a bracket start and close and then a curly bracket start and a curly bracket close so this is how we define a function and within these curly brackets start and close we can give the body of the function so let's say inside the function i will say println this is to print on the console and i can just say i'll say something like hello world so this is a function which will print hello world on the console okay now until now this is a simple function it is not yet a keyword if i save my project and i go to the keywords browser and i go to custom keywords and expand this you can see nowhere i can see my keyword or my function that i have created so as of now this is just a simple function but to expose it as a keyword you have to add an annotation at keyword at the top of this function so i will say at and i will start typing key if you want you can also press ctrl space bar control space on your keyboard to get this auto suggestion and this is the option we need at keyword coming from com.kms.catalon.cod.annotation so select this and make sure that this is what we have here and save your project and now this function will be exposed as a custom keyword so this is what we need we have provided the annotation at keyword and this is how it looks like now so now we have saved the project and now if you go to the keywords browser and go to custom keywords general you can see the keyword has come here so this is the class name dot the function name and i can now use this in my test cases so let's say i create a test case called keywords demo or i should call it custom keywords demo and if i use this keyword i can drag and drop like this or i can go to this add drop down and say custom keyword and all the custom keywords will be there in the drop down i can select my custom keyword or if i want i can also just start typing hello you can see i am getting this so this these are the two ways you can add it as of now i'll just just add it once and i will save and i will run and let us see the console so i will go to the console and double click so this is my console and here it is printing hello world so this is working so this is how we can create a custom keyword now here as i was explaining that if you want you can also create a keyword let us say i create a keyword called login or i create a function called login and inside this function i can club multiple actions or multiple keyword statements let's say i go to my test case script mode or manual mode and go to the script tab and here let us say these are the steps to login i can copy these steps and put all of these under this keyword okay and of course i will have to use the annotation at keyword to expose this as a keyword so now whenever i call the login keyword in any of my test cases all these three actions will take place or it will add this username this password and click on the login button so you can club multiple keywords or actions and create a custom keyword and in case you want to take an input from the user let us say i create another function i call this as hello user and here to take a argument or to take a parameter inside this function i will go to this bracket of the function and i will say i want to get a parameter of type string and i'm just calling it by this variable user and inside the function i am seeing println and i say hello and i will concatenate whatever is the value coming in user i am going to concatenate it or add it along with hello so now whenever whatever value it gets it will get printed here so it will say hello and whatever value it gets as a input to the function i will expose it as a keyword by using the annotation add keyword and now if i go back to my test case and go to my keywords browser and we have got this hello user here i'll just add it here and you can now see it is asking for an input value so i go to the input double click and here i just add my name so i say raghuv and i say ok and save and i will run and now if i check the console i'll double click to expand it you can see it is printing hello raghav so you can also take input from the user and we have done all this to add the keyword we can do drag and drop or we can just add the custom keyword from the add drop down and this is the example to take a input from the user now you can also declare the category of the keyword so if you see here when you go to the keywords browser here you can see all these keywords are under a general category or a general folder if you want to put all your keywords in some specific folder or category you can do that as well by adding this keyword object in the along with the annotation you can do that so let's say i will say here along with the annotation in a bracket i will say keyword object i can press ctrl space bar to auto complete and then you can just say it is equals to and let's say i just give it a name called hello just for fun here i'm just adding this and i'm doing this for all the keywords i have added and i will save and now if i go to keywords browser you can see we have got this folder hello and all our keywords are now inside this folder so this is how you can categorize your keywords okay so this is how we can create and use custom keywords okay so uh you can also try creating some more custom keywords try to create and run them and see how they run and you will have a good knowledge on how to create custom keywords now uh going forward there is a quiz that you can take now so i have created some uh different quizzes on catalon studio and i will give all these links in the description of this video so you can take this quiz it will take you to this catalog quiz one and you can just give your name if you want to and then do the quiz and at the end you will see the score each question carry one mark and you can then if you want you can let me know your score in the comment section and now uh i will stop this particular session here and then i will create part two of this master class and will cover the rest of the topics i hope this was very useful for you and you enjoyed uh learning and working with catalan studio if you have any questions you can let me know in the comment section and i will try to answer you as soon as i can i will see you in the next part thank you for watching and never stop learning
Info
Channel: Automation Step by Step
Views: 115,958
Rating: undefined out of 5
Keywords: katalon studio hands-on online training for beginners, katalon studio step by step from scratch, katalon studio by raghav pal, katalon studio beginner tutorial, katalon studio boot camp, katalon studio online course, katalon studio full course, katalon studio complete tutorial, katalon studio latest topics, katalon studio latest version training
Id: lcUgrciUCPg
Channel Id: undefined
Length: 118min 3sec (7083 seconds)
Published: Tue Jul 26 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.