Tricentis TOSCA Automation Tool Full Course : Step-by-Step Beginner's Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
everyone welcome to my channel in today's video we are going to cover try centers Tosca automation tool so this tutorial is for beginners who are trying to get started with this particular tool and we are going to cover around 20 topics listed down here in this particular video so this after completing this particular video you are going to gain an understanding and you will be able to create an automation script do the execution and get familiarity with all the basic concepts so I'm going to cover everything from introduction download how to do the certifications how to work with the different concepts of task and how to create automation script execution and all those things in this in this I am going to briefly cover the theoretical Concepts while we are going to focus more on the technical Concepts and we are going to work on using websites and doing a project as well okay so let's get started in just one more point to add here is in case you like the content do like share and subscribe and in case you have any questions do mention in the comment section I'll try to answer as much as possible from my end okay so let's get started so first cons first thing is Introduction to try centers so basically this is a tool which is developed by this company called tricenters and this particular tool how it is different from the industry standard tool like selenium and all is this particular for learning this particular tool you don't need to have a programming language knowledge you can get started with this however in in a very minor case if you do have programming knowledge understanding it is good for you as well because you can create custom controls with it but that's a minor portion of this particular tool okay that makes that is one of the reason for this particular tool to be popular however there are other advantages as well so I'm going to list a few of them so a this particular tool is based on model based test automation technique so in which you whatever is your application under test you use the scanning feature and you capture the properties using the modules which is easier than the other prevalent tools in the market okay now that is that is one or two features other than that it provides a dedicated repository it has a easier maintenance it has a lot of inbuilt function which you can reuse and it has Concepts like libraries uh recovery scenarios and lot of other Concepts which makes it very time efficient and very early adopter of automation and to talk about the automation uh coverage here you will get the uh you will get the knowledge you will you can use this particular tool to automate not only web pages you can automate mobile you can create automation for your packaged applications you can uh like create it for desktop applications they have dedicated uh scan methodologies for Salesforce and you can do it for sap as well so it does cover a lot of different applications hence it is very useful in the organizations to achieve a end-to-end automation using this particular tool and it is a license tool so there is a cost involved to this however you get dedicated support for this and scaling up is easier than a automation tool in which a programming knowledge like that ability is not required here so that makes it easy okay and it does have integration Concepts Advanced integration Concepts as well in terms of remote executions using CI CD pipelines or it does give ability for own distributed execution server as well which is called deck server in case of try centers okay so that was brief about this particular tool this particular tool is gaining a lot of popularity in the market so it is a good time to learn this and upskill yourself even if you are working on other automation tools getting a knowledge on this particular tool is only going to help you okay now let's move to the chapter two how to download and install price and testoster okay so first of all uh we need to go to their official website so since I have a login I'll just open it incognito so you will go to this support.frycenters.com and I'll put this link in the comment section in the description section and here you have to click on this register button and you have to key in all these fields Okay so even if this is a license tool they do provide a trial version for people to uh do a Hands-On and get an understanding on this tool so for that the major requirement is you need to have a business email so at the rate gmail.com is not going to work here so whatever is your company's email ID you can use that or if you have a specific domain ID you can use that to register this and once you are able to register this here then you'll be able to log into this portal and let me log in and show how does that look and give a brief overview about their portal so they have created lot of different tools other than only tries and testoster automation tool they have q test they have something for performance testing as well and they keep working on uh new tools as well so this is a common One-Stop place where you'll be able to find all the details regarding this particular company's tools and all all their offerings now here if you go to this product support section you you'll be able to see what kind of different products they are offering okay now uh they have this section where if you are facing any issue you can post the questions or you can read the articles and you can go through their documentation okay now for us to download this particular tool the first thing we need to do is we need to request for a trading license and post that you will be able to see uh the download for this particular tool available in your download section okay so for that uh there's a particular link on which you need to request for the license and I'll put this link in the description so here once you come to this particular link you have to login in case you are not already logged in and they have different concepts of gaining the license one is called Cloud license which is pretty popular and handy because if you are using this kind of license it does not matter on which machine you are and it takes your authentication based on your login okay and second thing comes on-premise so in case you prefer it to download it on your particular like one particular machine then you can use this option as well I would prefer this option but it depends on your need okay if your request on this then you are going to get a key probably here which you need to key in when uh you need to activate it once you download the tool okay if you click on cloud here you just need to click on this request cloud training license and here you will see something called deploying or something and this is going to take two to five minutes and you can probably log out and log back in and once you see deployed you're good to go okay so once this thing is done you can click on this download rice and testoster either from here or you can go to product support and click try sentence Tasker here okay so if I click on here here you'll be able to see all the different versions so they keep releasing uh like long term releases which they call as LTS and the short term releases uh I think STS or something and here uh in the title you'll see different kind of uh tools what they have so we need to focus on Tosca and tri-centerstoska is something which we look for I have 16 version in my machine but their latest version is 2023.1 so whichever you would like to go for you can select that accordingly so all we got to do is we need to click on this and the download of this particular tool will start okay now this is going to be a bigger and all so you need to wait for that download to finish okay so once you have downloaded this you will be able to see a file something like this okay and you have to you will get the zip version so obviously you have to extract that and then you have to run this exe file so if I click on this uh the installation process is pretty uh standard so I already have it installed that's why I'm getting this repair install modify option but you just need to click on next next next next next next and just agree the agreements and all those standard uh any tool process and download the tool okay so we have covered how to download and how to install so we'll cover the installation part now so we have downloaded this and once we have installed this then V after installation you will be able to see Tosca Commander here okay so if you type it in your search bar and you click on this you'll be able to see to ask a commander and there you will get a probably a login uh method in case you have opted for cloud license you can key in your credentials of this support portal like the credential which you used to create your profile on their support portal you just need to log in with that and you will be able to see a a pop-up here that license like this particular tool has a license and you'll be able to see a page something like this okay similarly like this in case you have opted for on-premise slices then you will have to go to project and here you will get option in accounts uh setting somewhere where it is going to ask you to key in your license key so basically uh if you have gone for on-premise license it is going to give you a key of at 16 digits where you need to click on project and then a license option comes in and then you need to select on on premise and key in that license and click on apply and you will be able to get into this so let me include close this yeah so here here this is the license what I was talking about okay so that covers our introduction our download and installing of the tool okay now we'll cover this certification roadmap overview okay so basically in case of certification how what kind of certification do they offer and all those sort of things let me show you that so if you click on this you will be able to see this Academy section okay if I click on Academy it is going to pop up this particular link if you want you can go directly here as well and then you have to sign in academy.com okay here you will be able to see all the different options like discover try centers Academy role-based product based learning my profile and all so if I go to role-based learning here you will see all the different type of trainings they have given so one is like automation specialist there are four courses in this and then test architect they have six courses extension developer five courses five courses and so these four courses are in this on addition to that there are two more courses so if you go here and uh you will see they have classes and all and they have all the different topics in this and then once you complete all those things then you will get a exam to give which you can apply and once you uh once you pass that particular exam you're going to get a certificate and that's how you can plan for it now it depends on the cost of this training it depends on on the connection between your company and try centers so if your organization does have a partnership they do offer free certifications but there could be cases in which you have to pay for the certifications and apply for the apply for the certifications and get certified accordingly okay so this was regarding the certification roadmap you can become an automation specialist extension developer architect and you can go for further certifications accordingly okay now coming to the fourth topic Tosca tool over you so before entering into Tosca we have to create a workspace so I'll just move this to the fourth point and I will move this to the fifth point okay so coming to the fourth Point workspace creation okay so in order to work with this particular tool first of all you need to create a workspace okay so here you will get this create new Option okay in case you are creating a new workspace and in case you already have a workspace created you can click on open and then select the workspace which you have created okay so if I click on create new uh I'm going to explain this thing little bit in detail so here you will get what type of repository you want to use so Tosca provides you a dedicated repository okay so you have different options you can go for Oracle you can go for SQL server db2 or sqlite okay these are the four different uh repository types it gives okay so this is used when you're working on a multi-user environment what does that mean that means that your entire team is working on that and you all guys are working in one particular project uh maybe projects can be different but your repository is similar and everyone's work will be present at one place okay so that is how it is going to be usually at all the organizations but in case you're just doing it for a training purpose Hands-On and all you can use this create single user workspace so this was one of the options and now I'll just Showcase in case I'm selecting let's say one of the common repository options what all fields we need to fill okay so first thing is connection string we need to mention the connection string as to what our connection string is and there's a particular format which needs to be followed if I click on this question mark it will give me the details like you need to have the server name the database name the user ID and password and once you have all these details you can click on test connection and if it shows successful then you are good to proceed with this and you can select any name for your workspace and you can click on create here okay here and it is going to create your workspace since we are going to use it for training purpose and we are going to use single user workspace so uh if you are just doing a Hands-On you can always use single user workspace but that's the difference essential difference between single user workspace and multi-user workspace okay now coming to the name for the new workspace we can give whatever name you want so I can write task okay beginners tutorial course and here you have the option to use workspace template you should always click on this option what does this do is it is going to import the standard subset so what does what do you mean by standard subset so basically the subset the subset is something which contains whatever standard modules they have already created for now you can understand that there are kind of functions you would say which have been created by try centers already and they have put it in a package for you to work with that particular package we need to import that okay while creation of the new workspace it gives you the option to uh import that as soon as the workspace is created so you should always use this option in case you have missed this option this is going to be the project path so since you have downloaded this particular tool it is going to be present at this particular location so you can always search for it and import it as we're at a later point of time in case you have missed this so if I'll click on OK then what it is going to do is it is going to create a new workspace now it is going to do all the required things and once this is completed it is going to close and it is going to give you the UI or the page which you are going to uh work on so basically this is going to be your toss the commander UI and this is going to contain all the uh all the details regarding uh how to create the modules and all everything is going to be here okay so that covers our workspace creation process how do we create the workspace okay okay so let's get started with chapter 4 a chapter fifth Tosca tool overview so since we have logged in uh to Tosca we'll be seeing the UI something like this now let me give you a brief overview so here in the project you'll be able to find all the different settings about Tosca which version you are using licensing accounts and all those things now here in the home section if you will go you'll be able to see the project which you have created so if I click on Project what would happen is I'll be able to see everything in one place okay now we have the option since this is floating we have the option to dock it here so if I right click and dock as a tab document I'll be able to see it here okay now here you have the option of the scratch book importing the subset exporting the subset will go through this as well and exploratory scenario and all these options are available here in case of view you will be able to see requirements test case design and all and in tools you'll be able to see buffer viewer xtcs schema and you have API testing tab as well here so here you'll see that you will have different sections like test cases which would contain like the standards here in case you have the module section and you'll have standard modules this is what I was talking about when we were creating the workspace that we have selected to import that so that's why we are able to see all these different options already populated here however we will go through this in the next video and we have the requirement section as well which we are not going to cover as part of this series but uh I'll be creating a part two in which I'll cover this as well uh this is the test case design section we are going to cover this modules test case and here is your execution and we have issues configurations test planning and all these options as well but uh this is going to contain all everything in one place so if you want you can work like this as well now let's say I do not want to see all these different modules I can click on this to close this as well okay whatever I do not want I can close this and in case I want it to be reappearing again I can go to my home and in section I'll click on this and I'll be able to click on this and this is going to appear back now again in case I want to dock this I can dock this and similarly whatever I want I can redock it okay and you have to just save your work whenever you are working on this and while closing you can just close like this and if you have created different projects then everything is going to appear here and in case you want to open any project you can click on uh whichever project you want and you can get started working with that okay so that covers the fifth chapter Tasker tool overview now let's move to the sixth chapter module overview okay so let me launch the tool again task a commander so let's talk about modules like so what exactly are modules okay so basically Tosca as I was earlier telling it's based on model based test automation technique okay so whatever you are going to work on with is going to be happening in a way that you are going to create a model what does that mean is let me quickly Give an example so let's say I have any website let's say google.com only Okay Google .com okay so whenever Tosca provides a a feature of second not sure why web browser is not responding correctly foreign if I want to scan this page and get the properties of certain elements uh I'll show you in in case of scanning a chapter that how do we scan everything but everything is going to get saved in case in as modules and then we can put that in test cases and perform actions of that we are going to take a look at that in the next few tutorials now here we are going to talk about the standard tutorial a standard modules what try centers already provides us to work with so here if you will take a look at the standard modules you will have three different types of standard modules like t-box automation tools dbox X engines and test data service so basically uh whatever kind of common operations we have that they have already defined and we can just use these to work with our application under test so here if you see in first dbox automation tool basic Windows operations so for capturing a screenshot for getting something from the clipboard or for sending some keyboard commands these all things are already defined so this is one of the sections in buffer operation so these are buffers are nothing but variables so if we can create we can delete we can set we can use a partial buffer here if you'll see we are trying to evaluate something some file operations we want to do some folder operations and you can execute selenium scripts as well of using this particular tool timing related stuff and then database HTML file a lot of different options are already available in this okay so you can check out all of these like Excel operations are there PDF testing also you can do with this and this is about t-box automation tools okay now why they have segregated this these are based on different engines so uh so if you will take a look at this uh they will mention the engine what engine is used so in case of this it is framework mentioned and in case of this it is mentioned HTML engine so all those things will be mentioned in the details here you can always take a look at properties and get an understanding on that now uh test data service this is a different uh module altogether in case of Tosca so they do provide a a place where you can manage your data and that is going to be secured so this is a specific section for that in which they have the option to find the data update the item delete import export and all those things okay so that covers the module welcome to chapter seven so we are going to cover chapter 7 and chapter 8 in conjunction so we are going to get started on actual automation stuff here so let's get started so first and foremost thing is Tosca communicates with a browser using a browser extension so if you are working on edge if you're working on Chrome you need to have the extension present in that particular browser and post the extension is installed we need to provide the access so do make sure that the extension is having full access in case you it is not showing full access you can click on this and here you'll have the option to change it okay sometimes this extension give little bit of issues so a good idea to download this extension is not from the Chrome Store in case you do not have it installed you can open any application and you can click on scan here application select that particular application whichever you want to scan or any any sample application and click on scan in case the extension is not there it is going to give you a pop-up that uh uh it needs a extension and it will give the pop-up to download so you can download it from there so that is going to download the right version and then restart your browser and then try it okay so that is the first setting which needs to be in place now this is for Chrome similarly for Edge and other browser the extensions are there now coming to other setup part uh what price index recommends is your Zoom setting should always be 100 and your display settings also should be 100 okay a good idea to check if you're scanning like before getting started with scanning that if it is detecting the right elements is I'll just showcase using this particular example so this is a automation mock website so what you can do is you can click on this you can click on scan uh click on the application and once your application loads you click on scan and probably take any one of the elements in this so here if you see username is there if I click on this and you click on highlight section if it is pointing to the right element then we are good to get started so do make sure that these settings are in place before starting scanning okay now uh this particular automation mock website has a login functionality and then you have you can place some orders and you can submit so there are a lot of uh different flows in this we are going to use this particular website and then uh we'll take a look at other uh other sample websites as well for uh this session okay so just a quick overview in this you have different users uh mentioned here and the password as well to log into this okay so we'll get started with this now coming to scanning so first and foremost thing is there are different methods of scanning a particular page in Tosca so if you click on app scan you will find lot of options here application API mobile PDF remote terminal and you have dedicated scan for Salesforce file in all different options but we are going to focus on application in this particular video okay so what are the different identification methods so there are in total five different authentication methods we are going to discuss about all of them uh but the first and the foremost identification method is to identify it using the properties okay so before that how to capture a page and all we'll cover that so if I'll click on application what Tosca does is whatever is open on your machine it is going to pop up all those as options so it analyzes your open items on your machine and then it throws those options so here we want to scan this particular application but whatever is open is going to be displayed okay now one thing to notice here is if I'll right click on this you'll see different options here HTML version AI UIA Winx and then it depends on what kind of application is there it is going to display.net or whatever is there so what Tasker does here is whatever application is in focus it it will try to understand what kind of uh what kind of page it is so based on that it will or it will do a auto selection but it is always a good idea to cross check this one so since this is a HTML page and this is what we wanted to scan uh we'll click on scan here but let's say the application is different in you like a desktop application is there and you need some other so these are different engines we'll discuss about this in uh next videos okay so now if I'll click on scan what Tosca is doing is whatever application you have selected for scan it is checking that page and whatever element it feels is Right important and all that it is going to Auto populate here okay so here if you see username password and login is there uh the thing which I was mentioning before if I can just click on this and click on highlight section it is going to show that which element it is referring to so that is also very good indicator has to understand that our elements are pointing to the right element on the web page or not okay so now let's take a look at this scan window so you have different ways like you can switch to basic here and then it gives the option to select whichever control you want on the page or if you click on Advanced it will give you all the different options so let's quickly cover this so finish screen is something if you are done with the scanning you can click on this and it will save your module or you can click on the save as well now let's say I want to directly select on the screen so you have this option to select on screen so if I click on this and let's say I want to use this so I'll click on this and it is going to capture that particular property okay if I click on this it is going to capture this particular property if it if I'm going to click on this so whatever you are clicking it is going to select accordingly okay now highlight section we have already covered whatever is in whatever you want to check you can select that and click on highlight section and then if you want you can keep moving it as well and it will give a screen something like this and highlighting the element which you have chosen okay now here there are different other options which we are going to cover uh but just to pick over you here you have all the other different identification options listed which we'll be covering and here they have a they have a methodology of self-healing like if there are changes automatically these properties would be updated but this will discuss later now coming to this particular section this is the filter okay so right now we are able to see just three the moment you increase this to Next Level it is going to include more and more elements of this so see if I have put it to Second To Third to Fourth now if I put it all the way to this side it is going to capture everything uh on the page okay now here you have the filter option so you can search for particular element using filter as well as well as search option in which you can directly just type something so since username was one prevalent property so if I can just search I guess search like this as well okay now in case of content preview if I'll click on this it is going to see if there is any uh like whatever content is there on your page that is going to be displayed here now coming to this select new application so what happens is if we have we are using this finish screen and we want to capture another Pages then we can click on select new application and again scan those pages and obviously closes close okay so let me switch back to the I'll not save this I'll again start this so first of all a good idea is always to follow a structured approach in your test case or module or whatever creation you are doing so I can right click and here I'll get the option to create folder similar thing I'll get on the top as well so we can create a folder Tosca tutorial series okay now if I start the scan functionality everything is going to get saved into this otherwise it was going to be under this period okay so I can right click scan and select from here otherwise I can do it from here as well okay so you can choose either option okay so here we have covered all these options now let's take a look at these options Okay so first of all this is your main page so here if you will see this is the section identifier properties and this is the most stable method so we should always try to explore all the different options to identify element by its properties and then if we are not able to identify in any way then we move to other scanning options available with us okay so first and foremost is uh we need to take a look at what kind of properties so you will have different kind of properties being popped up here exterioring representation Technical and since this is just a web page title so that's my title is auto selected okay now if the page is unique then you are going to see something like this the selected item is unique on the left bottom corner the selected item is unique so you have to make the item unique but you have to follow a process that whatever properties you are using to make the element you need is stable property okay so let's take a look at uh the actual elements so let's say in case of username I've selected this clicked on this and here I am seeing staring representation Technical and transition so these are different uh different properties okay now if you will take a look at this you see that you have action point context IDs there visible is steerable uh if the class theme and all whatever it could capture from this element it has captured okay so you have to first check here is which could be the most stable property and with which I can use to identify this element okay now if you have worked on selenium so here as well similar thing is there ID is there and which is username which is usually uh very stable property to use okay so we can use ID here we have inner text inner HTML and all these things as well but it will depend so if if I say inner HTML if I click on this see nothing has been captured okay but if things are captured we can use these properties name property we can use okay now in case you do not want to use all these properties you have X Path property as well which you can use to identify your element okay now this is the first thing we need to see whatever properties are there and with which I'll be able to find it uniquely so let's say I remove this tag I'll remove this ID okay so see you'll see this yellow option that the selected item is not unique since it is not unique now if I'm going to pass any parameters any actions on this the automation would not understand on which element it needs to apply it to right so it is going to fail so it's always like we have to find the element in a unique way okay so I'll just select this ID now let's say using this also you are not able to find anything okay so what could be the other way so the other thing is you click on more and you click on load all so right now you have certain properties displayed but not all the properties associated associated to that element is displayed so once you click on load all you will see way more properties being loaded here okay now you can always take a look in this if you are not able to identify with initial properties and you can select accordingly if something in this section is going to help you find it uniquely okay so that is one way second way is uh I can increase the filter and see if I am able to find it using the parent element so what do we mean by that is let's say this is not unique and I every every element will have some sort of parent Associated to it right unless you identifying just the parent element even then it will have uh a top one parent element Associated to this right so in this case if you see I have this div as parent of username okay so let's say I'm able to find some property in this okay and then using parents help I'll be able to find this so obviously I have to select something inside this as well if they have if this period has different uh elements present but you can use in conjunction to find this okay so let's say we'll go through this in the examples but just to give you an idea in case we want to use this but we do not want to display this okay because we are just working on with this element we are just using parent to identify this okay so what you can do in that case is you can click on this once and then you can again click on this so if you click it on two times then what will happen is this will turn into something like this okay now what happens is if you have selected an element using pair in something like this then if you once you move this module into your test case this is not going to appear at all so this is going to be in background now again if you want to remove this you can again click on this and it will get removed okay so that's how you use that so always remember first thing is whenever you are identifying it with the properties you need to explore all the different options uh click on more load all the properties select all the filters see in conjunction with what you can use you can use XPath as well so there are a lot of different options to explore here okay you will get this option to make unique with help of Tosca as well but uh you can all use this as well but if you're making any element unique using this just cross check that what property it is using because what Tosca is going to do using this feature is it is going to select whatever it feels like is the best property with which it is making it unique but it may not be a stable one so it could select location it could select something else so always a manual intervention here is recommended okay now we'll go back to username and in username I'll just select uh ID which we were selecting before so ID selected and selected item is unique okay now I'll just write this as login page now I'll click on save and I'll close this so this is how your module is captured now if you go back to your module section and you click on whatever you have scanned so here if you see this is the page what we have scanned okay if I'll double click on this you'll be able to see and this is the element username and here it is going to list out the properties as well so we have used ID that is going to be listed here okay so just to give you an idea here now we can use to perform action on this so I'll quickly cover just this particular portion and then uh we will see at the other different options so I'll move the login page I can drag and drop to test cases and it will create a new test case and this will go as a step or I can go to test cases right click and you will get the option to add a step so right click on the test case search and add Step at the moment you click on that whatever you have scanned is going to get populated and you can double click on that and it is going to appear here now whatever actions I want to perform I can perform in this so it's a text box field as we can see here right so what we are going to do is we are going to pass an input action mode input and value as whatever uh test okay I am just showing this to get in to give you an understanding on how further from modules uh the flow goes but we are going to cover all these things in detail so if I right click and run this what it is going to do is it is going to so actually I am not opening the browser and also this needs to be in focus and I'll just wait for this to pause sometimes it this takes time but all we are doing essentially here is uh let's close and reopen it again since the page was not in focus so all it will do is it will go to this particular page it will look for that property and whatever action I have performed so in this case we are giving an input with a certain text so that is going to get populated in that particular element so here if you notice test is populated here so that's how it works so this is the first method of identification in case of Tosca and it is called identify web properties and these all are the different options which we just discussed you can load all the properties you can select the filter all the way you have XPath option you need to look for the stable elements so this is a very important section of this video if you understand the scan functionality correctly then it would be a smooth ceiling for you going forward now the next portion which we are going to cover is identify by anchor so so here if I click on this uh if I click on this like already selected module and so let me create a new scan the modules I'll click on scan an application and we'll use the same page so let's say this login is there okay now uh let's say I do not want to use ID okay and I'll remove what are the property tag as well I'll remove these two properties okay now it is selecting some other property so basically uh these elements on this particular page are having very defined properties uh give me one second let me rescan this since there was no property to identify it shouldn't be identifying it but basically what I'm trying to show is the second identification method which is called anchor Okay so so let's say I use username for example and I'll remove the properties here tag and ID so here if you see this is coming as not uni okay so we will take this example that we do not have any properties to identify this element uniquely here okay this is just for example do their properties here to get an understanding on the different identification methods okay so now what we do in this particular case we can identify it using anchor so here if you go to this particular section and click on this you'll be able to find all the different methods like anchor image index okay so we are going to talk about anchor so first and foremost thing with anchor is how does this work so basically what happens is if I am not able to find a particular element what I would do is I will take any other element which is stable and we'll try to find this particular element using that particular elements properties so basically it is going to give a Direction so let's say we are using login Button as an anchor okay so login button uh how it is going to go is it is going to take a look at the properties of login button and then it is going to point out that I want to identify actually this particular element so let's see that in action if I'll click on this and login is unique so let me do it like this let me select ID tag and this item is unique now whichever element is not unique you click on that and you click on identify by and then you click on anchor then on the left hand side you will be able to see this particular pop-up okay now it gives go two different options to you either you can click on select on screen you select that element with which you want to Anchor it to or you can drag and drop as well so if you have the element here you can just select on this uh sorry you click on this and you can identify by anchor and then just drag and drop this to the Anchor control okay if it goes in Anchor control you will get a message something like this the target control was successfully identified okay now in case we want to change the control we can right click and remove the anchor and then Associated to some other angle okay now if you see this username is displayed as unique however it was not unique before so basically it will go to the login page and from there it will point it to the username okay now here as well you have different options like Auto shortest path coordinate but that will come in advanced versions later Advanced functionality but this is uh good to understand so if I'll click on Save I'll let me just mention this as identify by uncle and if I click on Save here and I close here so we'll perform a similar functionality I can just drag and drop this into the test case okay so same thing uh I have selected this but if I want uh I'm using this as an anchor so we'll just perform one particular action here let's say testing okay okay now the action mode is also important but task automatically detects as to what kind of element it is but it is always a good idea to check here okay so let me bring it back to focus and try to run this so you'll see on this particular page it is going to populate testing anchor in the first text box so see our test is successful and we are able to see uh whatever we have entered and we have identified this particular element using anchor okay now these were the top two identification methods in case of Tosca now we have other identification methods as well with image and with index so those uh two other identification methods needs to be utilized when you are not able to find any element using these two methods because those are little unstable so we are going to talk about image and index next okay so let's move to our next identification method identify by image now the point to be noted is we should try to identify using properties and anchor and in case we are not able to then we move to image okay so there are two ways you can do scanning using image one is from the modules you can click right and here you will find the option to create an image based control you can use this or you can scan go to that page and you can do an image based scan so I'll show that later as well so if I click on this first I have to Define what I want to identify okay so that is called as control in case of image based identification so if I click on this plus icon it will see drag the cursor around the control area so what does that mean is this is the element which we want to uh work with so in this case we are going to use password so I am just going to identify a link use the mouse and point it out and then Tosca asks you that what kind of element this is is it a button is it a text box or is it a generic so this is this is a text box we are going to click on this okay now it will ask that what particular image you want to identify it using Okay so let's take login so I'll drag the cursor around this okay so as you can see it is pointing to password so what will happen is there will be two different type of images here okay so the first one you see this is the control on which we want to work and using this particular image it is identifying this image okay now if I uh Zoom this out here you can see password and here you can see login now here in this particular section you will see screen resolution what is my screen resolution and what is the accuracy now since image based controls are totally dependent on resolution and accuracy it is a good idea to decrease this a little bit now it depends on your scenario as to how many different elements are there similar images are there so you can decrease the accuracy here so let's say I put like 85 and I'll click on Save okay so this is going to be my identify by image so let me just rename this identify by image okay now let's see this in action so let me drag and drop this to the test case and since this was a password I can rename this as well so let's rename this to password sorry here I can rename this okay now if I go to my test case here I can input let's say input anything uh test okay and since this is a password you have the option of the data type selecting as password so if I select password here this is going to be encrypted so the moment I click X out of it it is going to be displayed like this and now you do not have the capability to copy and paste it somewhere else so that's how the password is protected here now I'll go to my test cases and I'll put this focus in back in here and we'll try to run this so if I'm running this particular portion it is going to input the password in the password section so whatever the text I have given as you can see that this is working fine okay so this is how you use image based control okay now uh I was telling about another method so uh another way to do it so if I go on this and I click on scan and I go to my application I'll use whatever application so in this case this I'll click on scan okay now whatever element let's say password I want to identify it using image so I'll click on that and then I'll click on identify by and I'll go to image here okay now here the same thing the control image and the identifying images there okay so Auto populates the control Image Auto populates with the element you are trying to select but in case there are not many properties here this might be uh not displayed here like something else might be displayed and then you can click on identifying images and select accordingly so see whichever method works for you you can use accordingly and save and the process is going to be exactly similar so two things just to note in image image based control is one is called control image one is called identifying image control image is something which the element you want to work with and identifying images the image with which you want the identification to happen and you can change the accuracy uh little bit decrease the accuracy percentage depending on what kind of application you have how many similar elements you have perform a few dry runs and you will be good to go Okay so these were three different methods by which we can identify okay uh now the fourth one here is identify by index so let's take a look at that I'll click on application and uh I'll take the same application I'll click on scan and let's take the username okay so let's say I want to identify this using index okay so since this is already having good properties I'll just uh deselect those and it is not unique now okay so in case to identify by index it's fairly easy I'll click on this and I'll click on the fourth option okay so the moment I click on that option what tosscut does is it automatically looks for that particular element and based on how many similar elements are appearing it puts a index on top of it and this particular identification method should only be used when you are not able to identify with any other methods which we have talked about and that is what event Oscar recommend so you you see here use index only if you cannot choose any other identification method so if I click on this then it is going to get identified using index now one thing to understand here is when you take a look at the properties so let me filter it all the way to this so it depends on what kind of element this is how reputable it is and in what structure it is so for example if it is coming as index 5 out of 7 okay so that means inside that parent there are around five elements and that's how it is indexing so in case the structure changes a little bit also this index is going to change that's why this is not that preferable method to use but there would be conditions in which you have no other option now here if you see uh in in the UI this is what we mean as properties and in case of anchor you will see this button like the upper arrow thing like this and in case of image you will see a image icon in this and in case of index you will see so something like this so This easily denotes that with what kind of property you are identifying your element but let's check this out if this is working fine or not so we'll write identify by index and I'll click on Save now since this is a username I'll again drag and drop this to my test case and I'll put in the new test case and we'll put in something let's say index okay and I'll save this and we have this here so we can run this and this should populate index in the username section as soon as the execution is completed so see the index is populated in the username section so now we understand how we need to and how we can identify it using so this was identified by properties let me just rename this and properties okay so we understand how to identify by all the different methods now uh we'll see in the application wherever the scenario would happen I'll show you identify by parent as well how to do using that as well now uh you understand how to drag and drop and create your test case so we are not going to use all these different properties what we are going to do is we are going to work on this particular application and we'll see whatever best property fits in the next few tutorials and in the next few chapters and wherever the case would arise for us to use anchor or image we'll use accordingly now this covers identification by all the different methods now uh I would advise in case of scanning try to scan different applications and different kind of elements this is a rather easy page now we'll move to the next page and next page and we'll see all the complexities but try to practice this on different applications and expertise on how to scan and get the right properties okay okay let's get started with the chapter 9 test case creation okay so we'll take this particular page only and when we'll go through other Concepts we'll build on top of that okay so let's say uh our test case is to launch this browser and then launch this particular URL in your username and password and click on login and then let's say we are performing a logout operation okay okay so for for this I'll go to my tasker command and first and foremost we'll get started with module operation we'll do a will create a different folder for this so let's say login page automation and we'll scan the first page so I'll click on application and here I'll take all the three elements which are required so username and I'll validate that it is highlighted correctly okay password is highlighting correctly as well as login okay so in order to select all these three elements to appear I am going to click on all these three I'll just click back on highlight so that it comes like this I'll just write this as login page okay and in case of username this is unique password this is unique and login this is unique you can always validate with what property it is becoming unique okay so we are good I'll save the module and I will close this now the second page uh coming to this then we have to click on login and then we have to move to the next page okay so will do accordingly I'll go to my test case and I will create a new test case so you can go to the test case right click and you select this option to create the folder and select this option to create the test case so I'll click on create test case and we can write login page automation okay now we need to add this particular module okay so first and foremost I can do from search and add step here and I can copy this okay now in this particular page we need to pass the username password and click on login right so here it has already given so I'll use this particular username I'll copy from here commander and I'll put the value here and you see the action mode we are going to talk a little bit more about it in the coming sessions but this is a text box and we need to input so by default input will be selected but just in case this is not proper do check this now in case of password I'll copy this uh and I'll paste it here and you see the data type is already selected as password and the moment I put in this and I click outside this will become asterisk so you won't be able to see the password okay now in case of login it is a button so we can perform action on it right we can click the button so what we need to do is we need to put curly brackets and this will give us all the different functions so click is one function which we can use and we'll close the curly brackets and the moment we click out of it it will display something like this so that means it is correct okay now we can quickly validate this if it is working fine or not so I'll right click and I'll click on run in scratch book or you can alternately use F6 key as well so it should key in the username password and then click on the login button uh we'll wait for it to happen okay see the credentials entered and it linked on login okay now and after coming to this page we have to log out okay so we'll click on this the functionality is we have to click on this three buttons and then we have to click on log out okay so we need to scan both these elements right this element and this element okay so let me go ahead and scan these pages so I'll come to this I'll right click scan and I'll go to my application and here I'll click on scan so for selecting the hamburger menu I can search this here or I can select on screen as well and this is recognized here now I'll just save this as uh for this particular page is let's say products Pages there so I can write like draw depths page and I'll save this module so in case I have since I have to scan another page I can click on finish screen and then I can scan the next page right here so just bring the page as to whatever state you want to so you want this now we'll click on scan screen and here I have to click on logout so I'll select this and I'm able to see logout so I can write products page slider window and logout is unique so we are good here we'll just save this now I'll close this and we have the required modules ready okay now what I'll do is I'll put both of these modules I can select and put it in my test case Okay so the first thing is we are logging into okay so you can rename this as per your uh wish so we can write like input username and password click on login so you can if you want you can put it in two different steps and perform actions accordingly but uh just uh for this video I've written it in one go now in this we are this needs to be up because we have to click on the hamburger menu first so I'll put I'll do a rename and I'll put click on hamburger menu and here I'll write click on logout link okay now we'll pass the details so here after logging in we have to click on this so we will pass the value click okay and here on the logout link and again pass the value click okay now let's just check this out that it is working fine or not so these two we have added and the state it was the page was like this so let me just run both of these I right click and run in scratch so here you can select two three or one whatever is you need so it should click on the hamburger icon and then it should click on the log out link so it is clicked on that and then it is clicked on logout so our test cases uh steps are working fine okay now if you see here uh we have uh we are executing these cases when our page is open okay but ideally that would not be the case right so we would need to first open the browser correct and then close the browser as well so for that Tosca provides inbuilt modules uh you can go into modules and take a look or a easy way would be then right click on this and click on search and add step or alternately you can use Control Plus T and here you can write like search for browser and you have closed browser and then you have launch URL open URL so I'll click on this and I'll put it on the top and here we have to mention which URL we have to open okay so I'll just copy the URL from here and I'll paste it here okay so this is going to launch my URL now after performing these actions I have to close as well so I'll right click search and add step and I'll use the inbuild function so that is like close uh or browser and close browser is there so title means whatever is title uh title is there on the page so I can just try it it's written swag lab so I can write this black okay so we are launching the URL we are entering username and password and this is how test script is created okay so end-to-end test script is created now we need to know that where on which browser we have to execute the script okay so for that if you click on the test script the test case here you will be able to see test configuration so you click on the test configuration and right click on this and here you will see this create test configuration parameter so I'll show the flow again go to your test case here you will see test configuration tab click on this right click on this and here you will see TC click on this and if you click out of it and then click on this drop down you will be able to see lot of different options here okay so you can Define which browser you want to do your execution on so if I click on browser and here it will give me all the different options so let's say I want to execute it on Chrome so I'll select Chrome and accordingly you can change this and this is going to be applicable to all the steps since it is at the test case level okay okay so this is how you create a test case uh this is a very short format but depending on however number of steps you have you will have everything inside this okay now uh for us to run uh we'll try to run this before this I'll just close this browser so that there is nothing open and let's see how this performs so I'll right click and click on run and scratch book so this is going to launch the browser it has launch the browser it is launched our URL it has keyed in the details just clicked on hamburger menu and then it is clicked on the log out and close the browser okay so here after the execution if you will take a look all your test scripts have passed uh how we can know that is everything is green okay and then if you will have certain validations verifications here those all are going to be displayed here as well so that covers the chapter ninth test case creation though we have covered a very high level test configuration parameters here but we are going to talk about this thing in detail uh so let's discuss about test configuration parameters okay now test configuration parameters are the parameters which you want to set for your test cases okay so does that mean we can only mention browser here no you will get n number of options too mention here so the easy way is right click click on this TC and you can add as many as you want here and if you click on this it is going to give you most of the standard options which are going to be used so like you can mention the browser version you can mention RPM server see cicd integration device name uh like device name is for the mobile automation testing obviously and then whatever different type of options are available it will give you that okay so you can select whatever is your need for your test script and you can select accordingly and give the details here okay now another thing what you can use is in case the data what you're entering in these uh steps in case you do not want to hard code here and you want to pass it as a test configuration parameter you have the option to do that as well so the same way I've added the parameter here you can write your own parameter like whatever name you want so what we'll do is we'll just write user name here and what we'll do is the username what we are using uh or let's use URL instead of this let me write URL okay now this URL what we are passing will not hard code this here will hard code this here so it will be easy for maintaining your descriptive okay so let me copy this or rather cut this from here and I'll paste it here in the test configuration now here you'll see the data is coming here now in case you want to use this inside the test script how would you do that so uh either you can drag and drop that test configuration parameter here it is automatically going to populate the required syntax or you can do it manually as well and that is going to be curly brackets CP and then square brackets and then whatever the name you have given so we have given URL here I'll give URL and I'll close this and the moment I click out of it it is going to display in the format like this okay now in case we want to validate that this is uh is this capturing the value correctly or not you have the option to do that in Tosca so you just slide over whichever step you want to validate and you right click and you'll have this option of translate value so if I'll click on this it is going to give me the actual value which is uh going to be fetched with this okay so this is what we are entering and this is how it is being used so uh we'll quickly do a run here obviously this is going to work but just to validate this so as long as it is able to launch so it has launched the URL correctly we are good here so see uh while automation you should not move your mouse but you have the option to pause close and all here as well I was trying to do that but it happened so quickly and it got closed so but you have the option to click on the pause button and resume the execution as well as close it okay so this is how you use configuration parameter and you can Define whichever parameters you want here and you can use the standard ones as well okay now there are certain settings as well like there are synchronization settings or timeout settings uh that can also be mentioned in the test configuration parameter okay so we have covered the 10th chapter as well now uh we'll take a look at action modes which is by default going to cover this creation as well and then we'll take a look at bits okay so we'll talk about action modes now so what are action modes in Tosca action modes are something which will perform a certain action okay now where would you find this we'll find this in the test cases section so if you open any test case you will be able to locate this action mode here okay now I can remove this as well by right clicking and removing it from column Chooser in case it is not available click on column Chooser and from here you can just click on this and it is going to display that okay now if you take a look at action mode here since this is not a property like this is just a higher level of the test script you won't be able to see but if you are seeing on the particular properties here if I click you'll be able to see now here you see input insert verify buffer wait on select and constraint so in total there are seven action modes which exist in Tosca now what's the functionality of these action modes these are going to perform whatever kind of action modes they have been associated with so input obviously it is going to just pass the input now insert is basically used for non-ui elements uh verifies you're doing some kind of validation buffer is you are setting up a variable we'll talk about this in the next chapter now weight on is one of the commands which is used for waiting for an element select is one passive uh command and constraint is for limiting your search I'm going to talk about all of these things in detail okay now we have talked about this this thing previously but here if you see in case of username we were selecting the action mode as input right so what it was doing it was entering this particular value in this particular property and here in the UI it was this usably okay so it's pretty standard input is used for entering whatever value you want to input in there okay now let's say uh I want to use verify okay where can we use that so basically you can use it anywhere but uh we would need to we can try to find out one of the validations here so let's say uh let's say in username only if I want to verify so if I click on this if I'll click on verify okay the moment you click on verify here you will get this option and if I click on this it will give me certain options to validate it okay now there are depending on what kind of property it is what kind of details it has captured based on that it is going to pop out these options okay usually you'll see all these four options sometimes you might not see in a text as well okay now when we talk about exist enabled and visible okay so these are going to be derived by the Boolean values Okay so first thing is let's say we take it visible okay and here what I mean by Boolean is I have to mention either true or false here okay now if I put true here and let me disable the remaining steps because we are just trying to understand right now what is verify command or how does it work okay so let me disable this and here we are validating just the username I will remove this as well because otherwise it will go to the next page right so we just need this we can try to run this uh by executing the entire script or we can just run this particular step as well right so I'll just run this to save time and so once this runs in the execution scratch section you will see that now the login info is getting populated okay now if I click on this three dots here you will see the expected value is true and the actual value is true okay so this works in k this works on Boolean values okay what it has done is it has gone and looked for the property and if it was visible then it has passed the script okay now this was for Visible now let's say uh where would I use exist okay so let's say the element is does exist on your page but it is not visible at that point you can use existence with so dot exist is equal to True okay that's where exist is used now enabled where do we use enable so you will see sometimes uh in the pages where the buttons are enabled after entering something or it is disabled and some form of validation goes through and then it becomes enabled so you can validate if a certain button is enabled or not so you can use enabled as well to true or false based on your condition okay now the inner tech for a particular property then you'll be able to see this option as well in a text okay now in this case I can mention uh what is my inner text okay so usually it should be something like this in case even if the spelling is wrong it is going to fail and we'll be able to see this so here you can validate with actual in a text property okay so if I run this so see this is failing uh most likely it should be uh case sensitive issue so here you see verification has Fearless coming and if I click on this the actual value it is not picking so basically the inner text is not going to work because the module when we have captured this module in the inner text there was nothing now we can validate that if I go to this there shouldn't be a property in a text here so here if we see there is no inner text right so that's why it is giving blank there okay now if the index property is present then whatever name is there you can mention it here okay now can we use only these standard things for uh verification no we can use other properties as well uh not all of them but a lot of different properties we can use like we can use outer text as well now in case you want to write something like that you can either select in the in the flow like this and you can change this accordingly here equal to not equal to or you can just write it so it goes like Dot and if I'll write outer text equal to and then whatever value let's say I'm writing test okay so similarly like this whatever kind of validations you need to perform you can perform it accordingly now let's move to the next action mode buffer is there uh I'm going to talk about this thing is the next chapter so we'll skip this uh similarly weight on is something we are going to discuss in the weights chapter but let me give you a brief idea so basically what happens is when I select weight on I can use this particular action mode to wait for this particular property to be available or appearing on that page before a action is taken uh this is a high level why Weighton is used we'll discuss about it in the weights chapter okay now coming to this uh select section okay now when is Select action mode used so select action mode is basically a passive action mode so when does this kind of scenario happen so whenever you will see a structure in which uh you will have some parent and some Childs are there and you want to perform any kind of action on the child element then by default the parent will be selected that's how it will be able to travel to the child element right in that case select command is used so let me try to see if I can capture uh any one of the we can try to move to the next page and see if we can get something so sorry let me put standard user secret underscore source okay now let's try to see uh if this comes in the parent uh this thing let's start the fire of the scan we'll try to find out some something like that to understand the select action mode in a better way okay so my page is loaded I'll hit on scan and here I can take probably this Source Labs backpack let me highlight okay this is coming like this and if I use this both of these things become unique yes okay so we can take this let me give you link uh give an idea what I'm doing so basically I have selected this particular image and I have identified it using the parent so you can bring that back so here uh if I click on this it is highlighting on this and if I click on this it is highlighting using the link okay but let's say I want to validate the image okay so let me move this and the thing which I was talking about parent so with this it is able to identify it uniquely because if I'll select this alone then it is not unique okay now let's say I want to use uh I want to perform an action on this particular element okay not on this okay so I'll just say select action mode and I'll save this I will close this and let's pull this in our test case so drag and drop and we can use it anywhere so here if you see I want to if I want to perform let's say action in this verify if the image exists or not so if I select exist is equal to true so C by default select this selected in this case Okay the same thing would happen when you're working with web table so there would be a lot of different scenarios wherever the structure is in a way then this by default action mode will be selected so this is a passive action mode which is not actually doing something but actually helping just to Traverse through the element structure okay I'll just show this if I delete this see the below thing is also deleted now again if I select this and I put like the moment I selected this you see the select has populated okay if I select like this so there would be a lot of cases in which you need to work in a similar way okay now this image is there let's try to run this and see so if I run this it is passing and uh if the if you'll see the scratch book it has gone from this to this and here you see the verification is successful okay so this is how the select action mode is used now what are the other action modes so another action mode is constraint okay now constraint action mode is basically used to limit the search result so I'll I'll make a separate uh video on this which I'll put in the link put the link in the description section but this is little uh like I would need a specific web table so we'll cover this thing in detail in a separate video but for a high level idea what constraint action mode does is it will limit your search so let me look into this uh web element table is fine so wherever you are able to see a web element so it will look something like let me just check yeah it looks something like this okay a web table will look something like this so in this case in cases similar to this let's say I want to search for some specific data okay now what I can do is I can search each and every data okay but using the constraint action method I can literally uh put a specific search that I would need this this and this so let's say in this case I have expected date issuer and industries there okay so if I do a scan on all the elements and let's say I want to find uh who is the issuer and based on these three input parameters I want to find so I'll be able to scan these three uh different uh elements and then I can pass these are the parameters so let's say this constraint is there and here I can see like let's say the name or the inner text or whatever property is suitable for that so let's say in a text is equal to uh in this case it is like expected date so let's say the property is expected date I'll put expected date so what it would do is it will put a condition on top of that that search only with this particular element okay uh now here like let's say if I use the ticker and mrvi is there so I can measure mrvi here similar something like that okay so that's high level about the action mode let's start with the 12th chapter buffer creation so basically what is buffer buffer is nothing but a variable now this is used to hold data save the data and then use it further for verification validation or identification or any sort of activity so basically buffer in case of Tosca provides us the ability to save the values now in case of buffer will cover how to use buffer in a test script before that if we'll take a look at the standard modules and if you go to buffer operations you will see four different buffers which are already provided by try centers so we will take a look into all of these now let's understand the use case first for a buffer and try to see how it works okay so if I go to the application which we are talking about from the start slash demo.com and let's say our use case is I log into this application standard underscore user secret underscore source and I log in and I'll navigate to the products page okay now let's say this is the name of this particular item okay and my my K my test case is like I have to select this then I have to move to cart and I have to validate that the name what is appearing here is actually appearing here as well exact same name so that is the use case with which we are going to work okay now let me bring it back to the original condition so will scan this particular page I'll go to my modules and we can just create one folder called buffer creation or buffer example and I'll fire up my scan and we are going to capture the name from here okay so I'll scan this and we'll use the select on screen and we'll use this and here if you see in this particular element this is unique and we'll just quickly take a look at the properties so it is taking ID it is taking uh we'll select the inner text as well okay now we'll write products page buffer and I'll save this okay and I'll close this now what I want to do is I want to click on add to cart and then navigate to this particular button okay so I could have scanned in that same page but let me rescan it will keep this separate just for a better understanding but in in actual scenario you can uh scan everything in one page okay so we'll get the add to cart button and the link so I'll click on scan and let's take the add to cart button and we'll take this link okay we'll just validate if both are unique so add to cart is unique however uh the link image is not so we'll see with which property we can so here if you see we can take the class name shopping cart link because there is going to be only one card link here so I can write that card link and I'll write products page other elements I'll just save this and we'll close this and I'll click on add to cart click on this and on this page I have to capture this so I'll again quickly fire up my scan and capture this because this is what we are going to do we are going to pick the name from the previous page and validate it here that if both are matching or not okay now I'll click on select on screen and I'll select this so I have the link here we can use this and we'll just quickly validate okay so this is unique here we are able to see it UD and I'll just try to test card each and I'll save this okay now once again I'll reiterate the scenario so basically we are logging into the application then we are coming here we are capturing this particular name from this page then we are adding this to the cart moving to the next page and we are validating here that the same name is being appearing here okay so I'll just remove this so that the page is in exactly the same condition okay and we'll quickly build our test case so I'll go here I'll create a test case buffer example okay and I'll pull in all my three modules so I can select all these three and put in my test case here and here I can write so first thing we want to do is we want to capture this okay so how do we do that we will select the action mode buffer here what buffer is going to do is now it is going to look at this particular element and capture the property and assign it to a variable okay so we have selected the actual mode buffer but there should be a name for the buffer right so automatically this is being popped up but we can remove this and put whatever name we want so we can write uh buffer name validation whatever you want okay now this is the buffer name and the property is going to be assigned by this particular element okay now a quick thing is if you want to take a look at this particular buffer we have the option of seeing it in the in the buffer viewer but there would be nothing assigned to this or it has not been even created right now once we run this particular test then this buffer is going to get created right now uh this is what we are capturing and I can just write this let's rename this and follow uh capturing data in buffer and here next we want to do is we want to click on add to cart so I'll write this click on add to cart and post that we want to click on this cartoon link so I'll just copy this test this step and I'll paste this here and I'll move this on the top and here I'll write click on the card link okay now after that what we want to do is we want to validate on this page so uh I'll rename this and I'll write validating product name okay now here we have created a buffer we just perform this step so we are clicking on add to cart so I'll just pass a click function here click and then I'll click on cart link so I'll just write click here as well click and in case of this the actual validation comes into picture so we want to verify this so I'll write verify here and I can mention the buffer name here now in order to use the buffer name you have to use curly brackets B square bracket and inside this you need to put the buffering okay now if I'll do only this much whatever buffers I have in my workspace are going to be populated here okay but let's say uh the buffer what we have created is we have put buffer name validation however if I'll try to search that I won't be able to find that because this test case this has not been created yet okay so good idea is to copy this name so that we are not making any mistake here now if I go here and if I put this here exactly like this okay I'll close this and I'll close this packet okay now the moment you click X like out of it it will show something like this so basically what it is going to do it is going to go to this particular element see its inner text property and validate it with this particular buffer name which it is capturing here okay so we'll see this in action first we'll run a step wise and then we'll run uh all in ones so basically here we want to capture this we'll see if it is working fine or not so I'll run in scratchbook so this should capture the name of this and put it in the buffer so it is passing we'll take a look at this scratch book and here in the login info if you will click on these three dots you'll be able to see buffer with this name has been set to Source Labs backpack okay now this buffer can be reused anywhere using the curly bracket syntax and whatever the name is there in square brackets so here now we'll try to run the script and we'll see uh so I'll select all the four steps and click on run scratch book so again since I am running the buffer name validation again it is going to check and reassign the value okay now it is clicking on add to cart now it will click on the link however it is not visible right now here so it is on the top of the page so we'll see if it works or not otherwise we'll fix that okay so since it was not able to see this particular link that's why it did not work maybe the scroll was little down so we'll talk about this uh in case you run into this kind of condition you can always use one steering parameter called a scrolling Behavior but we'll discuss about that in in the next lectures in case of advanced one so let me try to see if this works without fixing that and I'll read rerun this so I've made sure scroll is on the top and I'll try to rerun this again so you should click on add to cart then it should click on that link okay so it is actually scrolling uh down so that's why this is not working let me stop this let me make sure it is 100 okay so I'll quickly show that parameter and in case of conditions like this so we have clicked on add to cart link now we have to click on this so what I can do is I can go to this okay money back so here I have clicked on this I should be clicking on this so one thing happens is um whenever your mentioning any kind of action on any particular element so what it would do is since it is present on this particular page it will try to find it and it will do a auto scroll so I was assuming the auto scroll was not happening but just in case the auto scroll is not happening quickly I'll show that you can right click go to the module attribute and here you have the option to add the steering parameter which I'll right click and you will select the steering parameter and you can write scrolling Behavior mention top bottom center or whatever way your application behaves and then this will work fine in case it is not taken care by default but will by default take care of this it's just that the action mode uh the action what we are performing we have not entered in the right place okay now we'll just try to validate if this works so I'll bring it back manually to the same state and we'll run this and I'll right click run on scratch book so it will click on add to cart and then it has Auto scrolled and clicked on that this page has a certain limit maybe because of that it did not work so I will re-enable this standard underscore user secret underscore source and click on login so you'll be facing this these kind of issues while you're automating so this is the part where we debug all these things so this is going to be helpful these kind of scenarios we'll try this again I'll run in scratch book and I'll click on this and on this page it is going to validate that this name is this so our test case is passed let's take a look at scratchbook so here the data is captured so here if you see in the buffer name Source Labs backpack is there then it has clicked on add to cart then it's clicked on the card link and here it is validated now here you see the verification was successful now if I click on these three dots you see this was the expected value and this is the actual value so our test case has been passed so this is one use case in which buffer is used okay now does that mean that we can only use like some values to assign or it automatically assigns anything and we cannot assign any other property to this so that is incorrect in case of buffer creation using the element you can assign it using other properties as well so for example if I go to if I right click and jump to the module attribute and here in the modules I see that ID is also there and we'll have name will have value to use we'll have different properties in case of different elements but in this case ID is there okay so let's say I want to use this how would I do that I'll go to my test case instead of Street mentioning the value like this I'll say a specific property to be used so I'll write i d here and on the left side and I'll click like this so what will happen is it is telling the the script is send is going to send a command in a way that buffer the value with the name this and use the value which is mentioned in this particular property okay so since we are just dealing with this I'll take this particular example and I'll move this back to our original state and this should capture the ID value so if I run this in scratchbook whatever the ID property it was something like a product imng IMG link or something like that it was there let us pass now if I go to this here you see the buffer name has been set to item 4 title link okay so you can set the buffer values accordingly dot auto text or whatever you want just check that whatever value works here it will be assigned to this okay now this is one way you can create the buffer accordingly and you can reuse it okay now how to see where like what details currently I have in the buffer okay so for that you go to this view section uh sorry you go to this tools and you will see this buffer viewer if I'll click on this you will see whatever buffers are being used in this particular workspace okay so our name is buffer name validation so you see buffer name validation has this particular value assigned to it so in case you want to check you can check accordingly like this okay now uh initially this was taking another value right uh it was taking a source Labs backpack so if I remove this and run this again then what is going if I remove like let's say I'll remove the ID part here and if I run this again then what it is going to do is whatever value it has before it is going to override that particular value okay so that's how buffer is used in the test scripts now uh Tosca does provide different modules so I'll go to which we talked little bit in the initial part so you go to standard modules you go to T box automation tools and here in the buffer operations you have four different buffers so let me just copy these and I will go to my test case and I'll put it in this only so basically t-box name to buffer this is a different kind of uh module which is used to extract the test case name so we are not going to discuss this because this is not going to be applicable in case of scratchbook it is going to be applicable in case of execution and we extract the test case name using this particular buffer so we'll talk about this in the advanced sections now whenever buffers are created those take the memory because it saves uh locally uh like it's safe locally in your uh in your automation tool so basically it consumes the memory so good idea to delete the buffers as well okay so you for that you can use t-box to delete buffer and here you can just mention the name of the buffer so we'll check this in action I will take this buffer name validation is what we have created we'll go to delete buffer and here will put something like this and if I run this and we'll try to see if it is deleted correctly or not so for that here you will see buffer name this have was successfully deleted however for us to validate we can go to buffer viewer and try to see so right now we are not able to see anything called buffer name okay so so you can always use t-box delete before in your test cases accordingly in case you want to delete the buffers as well okay now let's say we do not have a test like a module captured where you're creating the buffers like this so you can use t-box set buffer as well so here the buffer name goes in this case you are mentioning the buffer name here but in case of set buffer the buffer name goes here so the same buffer I want to create so I'll put that buffer name here and in case you want to assign a value to this you can assign a value as well here it will work both ways in case you want to assign the value right now or if you do not want to assign the value so let me write test here and we'll just validate if it works or not so I'll run this and it will create this buffer and it will assign the value test to this okay now here in the scratch book if I say go here buffer with this name has been set to Value test I can go to the buffer viewer and see okay buffer name validation test has been successfully created okay now there comes a concept of partial buffer as well so in case of partial buffer like let's say you have a text like this Source Labs backpack which what you have extracted but let's say I am in the need of only the first five characters okay uh how would I extract the value a partial value from above okay so for that partial buffer is used where you mention the buffer value name what is the value what is the start what is the end and way to end so basically it would be uh setting up the pointers and then capturing the partial value from a buffer okay now there is a concept of dynamic buffer as well which comes into picture and uh you have the option to extract a portion of the data as well as a buffer but that would we would be discussing in advanced sections here we have covered the majority of the pardons since this is a beginner course uh I will I'll be creating a separate video for uh in detail buffers but this is this is about how to use buffers what are where it is stored how to delete it where it comes into picture and you should always check you can always check the values in the buffer viewer and that's how the buffer is used talk about the 13th chapter called weights weights or it is called as synchronization as well so basically why weights are used let's understand with an example so I'll use this mock website UI testing playground.com so here if you see we have a section called load delay if I click on this it is not going to load the next page instantly it is going to take some time however when you script the same thing in your automation script your automation script does not know that this is how the application is behaving so what it will do is it will look for this particular element instantly and if it is not finding this element it will error out now in terms of our objective to test this application the application is behaving perfectly fine this is how it has been designed however our automation script does not know that so in order to handle scenarios similar to this or like this the concept of weight comes into picture so what would happen is we need to tell the automation script to wait for certain period of time and then perform the next set of actions okay now let's see in dosca what all options do we have available so first thing is if I go to standard modules if I go to t-box automation tools and in timings I will see this t-box rate okay so the first thing is static weight so you can use this particular inbuilt module and you can mention whatever duration you want this is taken in terms of milliseconds so you can see you can observe how your application behaves and you can add this weight okay now this is called Static weight now second thing is called dynamically so why there are two concepts the two concepts are because sometimes the application might take 10 seconds to load sometime it might take 15 seconds and it might take 5 Seconds also if we have introduced the static weight of 10 seconds then what would happen is every time your script gets executed it is going to wait for 10 seconds and in case it is uh increasing the time it will fail and in case it is decreasing the time then also it is going to wait for 10 seconds so what happens is that is not a very efficient way uh in terms of executing your test cases because it is going to take the dedicated time what you have mentioned in that and it will hold the execution for that particular amount of time and that is not efficient in terms of execution because it will take that much time okay let's understand with the example so basically this website is their UI testing playground.com here if you click on this and then you click on the home button and then you again click on the load delay it is going to take some time to load that page okay so this is how it behaves now let's quickly scan this so I'll go to my modules I'll create one mod uh folder weights and I'll right click scan the application and will capture whatever elements are required so I'll click on scan here and here I'll take home and we will take this button appearing after delay okay and I'll move the filter this side we'll just validate both of these are unique so we are good here I can save this and I'll close this and click I'll click on home and we'll just capture this load delay also so I'll quickly capture that as well right click scan application and I'll scan this I can click on select on screen to select this we will select this this is unique we are good I will save this and I'll close this okay so let's pull both of these into the test case let me create one test case here so we'll write it as weights and I'll pull both of these so I'll select both of these and I'll drag and drop into my test case okay so the first thing is what we are doing is we are clicking on this particular button okay so we'll click on this and we'll rename this to click on button and then I need to click on home so I'll just copy this and I'll push it up and here I'll write click on home I will delete this and I'll write here sorry about that I should be clicking here and I'll be deleting this and here I'll put click okay now if you click on the button click on home and then I want to click on the load delay okay so I'll click on load delay okay now here I'll do this okay so this is how our test script goes and let's say on this particular page I want to validate something so let's see validating button presence now here I can write verify and here I can select anything so we will select visible is equal to true capital t r u e okay now what would happen is if it will click on load delay it will take some time to load that page okay and at that particular time since the button is still not visible because that page takes time to load that's where it will fail so we have to introduce way so let's first understand the static weight I can right click search and ADD test step and I can search for weight here and we'll use the standard module t-box weight and I'll put this in between these two steps and here I can mention the time in terms of seconds so I have noticed it takes somewhere around 10 seconds but uh for the safer side I'll put some 12 seconds since this is in milliseconds I am putting 12 000 okay now I'll go back to this I'll see okay uh I want it to be the next on the next page so we'll move to the next page and then we'll kick off our execution okay now if I run this it is going to click on button appearing after delay and then it is going to click on home and then load delay and then validate again then this button is appearing or not okay now it will come to load delay it will click on this and now you see that it is taking time to load that page right so that's why the static weight of 12 seconds that is going to hold the execution for 12 seconds and then your execution will happen okay so our test case is passed let's take a look at this so here you see between this and this step we have introduced the static weight so it has waited for 12 milliseconds okay and then it has done the next set of actions okay now this is also one way we can use otherwise we can always use the dynamic weight okay now in order to use Dynamic weight we have to use the action mode weight on okay so what does this action mode does is it tells the script to wait for this particular element to appear okay now what would happen is here we have introduced the static weight of 12 seconds but in this case in case it is finding this particular element in let's say six seconds then it is going to skip the remaining 6 seconds and it is going to execute the scripts now if you see only 6 seconds is safe but if you talk about lot of different uh steps are there and you test Suite then it will save a considerable amount of time so always Dynamic weight is preferred in terms of static weight now there would be conditions where you would need only static weight to be used but a good practice is always to use Dynamic weight okay now if I uh let's say I'll delete this all together and if I run this now so we'll validate okay this is the right page I will run this and now what will happen is and even if it is like I was talking about the time reduction even if it is going to take more time let's say it is going to take 15 seconds that condition also it will be able to handle it because it will give that particular amount of time to check if whenever it is appearing okay and there is a there is a time to be set for the timeout as well so that can be set in the project settings you go to Project settings and there you'll have a timer because it cannot wait on forever right so there should be a time limit in which it should be performing this weight on as otherwise the script will become uh take in case the element is not appearing it is going to take forever right so there will be always a timeout settings which you can update accordingly so that is the concept of Weights here we have static Dynamic width uh Dynamic weight is always preferable however you can use the static weight as well Dynamic weight is used with the action mode weight on and then whatever property you want to use so here we have used visible but it will depend on your scenario whatever you want to use so if I click on this you can use enable exist in a text however you can use other properties as well like value Name ID so it depends on what kind of element is there and what kind of properties does it have based on that you can use it accordingly so that covers the chapter weights now next we'll move to the 14th chapter debugging and running in scratch book okay now we can move to our previous application so demo.com we have already scanned this application so we have the initial steps ready here so if I go back to my login page automation you are opening the URL we were passing the username password we are clicking on this and we are clicking on logout okay now let's say uh after logging in we'll just perform few of the methods here okay standard underscore user secret underscore Source I'll click on login let's say I want to add these two elements to the cart and then move to the next functionality Okay so we'll scan this so basically in terms of debugging and we'll try to understand whatever we can cover in part of debugging as to whatever issue would happen here uh otherwise for the next few chapters you would it's better if we like have more Flows In built into this for a better understanding so I am just covering all those things okay so here if you see I have just added two add to cart and this is our cart link which we need to click navigate to the next page okay so here I'll use the class name okay so class name is working so I can just rename this here to cart link and this is the product page so I'll write products page add to cart and uh card link okay and I'll save this now what we are going to do here is we are going to add these two items and then we are going to click on this okay now whenever you are automating any scenario you see what the function first we need to see manually what the functionality is then we should perform it manually once to see if we are able to understand each and every click and we are not missing something and then we automate the smaller functions of it like I have taken this particular module right now what I need to perform is I'll go to this test case and maybe I'll create a new test case here okay and in this we can copy the initial parts of opening URL uh or let's uh take care of that later here I want to click on this add to cart okay so I'll click and I'll rename this to click on first add to cart okay I'll copy this I'll paste this here again click on second add to cart and here I'll remove this I will add click on this okay and then I want to click on this card link right so again I'll copy this and I can paste this here okay entering rename this to click on card link okay now see this is what we are trying to automate the small feature of add to cart add to cart and then click on this card link okay now you will always scan one module and then try to perform your actions okay and then we'll try to run okay so we can run only one part we can run this whole flow or we can run the entire flow as well okay now uh we'll try to see if this works so what we'll do is we'll run this select these three cases and will run in scratchbook and this should click on First add to cart second add to cart and then on that link okay now in case of debugging uh in case of debugging we need to see that uh what elements we are taking and we have to perform multiple drivers to see everything is working fine okay if it is not working fine we need to find that what issues are happening okay I am assuming this is going to fail okay so this has failed uh good for us because we are trying to understand where it went wrong so if you see here click on card add to cart link and it is saying could not find the button add to cart with the following properties at took card with the following properties ID is add to cart and tag is button okay so here if we see it is trying to find this particular button add to cart Source Labs backpack okay in order to investigate this let's understand the scenario so initially it was I'll click on these two removed so application was something like this right it was clicking it was like this but after clicking on this button and this button the property of this link might change okay that is what we can understand from this failure could not find add to cart with the following properties because here it is saying add to cart okay now what I can do is I can right click jump to the test tab close this and here I'll right click and jump to the module okay now here our card link was not working so here if we see it is a taking first this and then this okay so we'll right click will try to rescan this and see in this particular state are we able to find our cartiling or not so we'll click on rescan you can perform a new scan as well it depends but if the page is already module is already captured it's always a good idea to rescan so you don't need to capture other properties but you can go either ways okay so our issues with the cartiling so we'll try to see so obviously these two controls will be unmapped because right now the properties the add to cart button has been changed to remove okay but this was working fine we'll see this link and we'll try to highlight the section okay so this is highlighting correctly however it is not working okay so we'll try to see tag is a shopping cart link is there so ideally this should work and the item is unique as well uh we'll see why it is not working we'll close I will not save anything because it is exactly the same like this and I'll go to my test cases and I'll try to run okay so see here I have made a mistake I have I was clicking on add to cart that's why it was really okay now I'll just delete this and I will put the click here so that was my bad now I'll bring it back to the original state and I'll run this and now it should work fine but there could be like timing issues load issues or the property might changing little bit the properties what you have used for identification is not applicable anymore because some changes have happened because of the clicks and all so it depends on conditions like that okay so that's how at a very high level you do your debugging so you'll debug you should debug your uh steps first and then you should try to run your end-to-end scenarios see if any timing issue is there any any clicks is changing any of the property any properties are being changed after some particular time so always do some dry errands with your end to end execution and inside your steps to try to figure out where the issue is happening and once everything is working fine just perform a few drivers in execution list and you should be good to close on your script now a small Point here is in case of Tosca we get this work state section as well which sees as planned in work and completed so the best practice here is to initially when you have just created this uh the for the test case you can put it on plan that is what you're planning to work on and when you're working you you should click on invoke and when you have completed you should change the work state to complete it so this will give a good idea to everyone else who is working in your project as to how the execution is going on okay now uh we'll move to the next 15 chapter chapter 15 in build function usage okay so for that uh I would need some text field so let me quickly scan this page and in the next page we have a few fields so I'll be able to explain it better there so I'll just quickly scan this page and then we'll move to the next page so here uh all I want to do is I just want to click on checkout and move to the next page so we'll just take the checkout quickly validate if it is unique it is unique I'll just rename this to checkout page okay I will save this and I'll close this and I will move this to the test case okay so I'll rename this too click on checkout okay and here I'll perform a click and I'll just run this step alone and it should click on this checkout link okay button and here we navigate it to the next page where we have to enter first name last name and zip code okay now let's understand about the inbuilt function usage okay now if you go to this value section okay and whatever you want to perform here okay whatever sort of actions we want to perform we have different options available here so if you put a curly braces here and you'll be able to see all the different options which Tasker provides you okay so let's cover uh I'll cover briefly every everything like high level and then we'll cover some of the most important ones okay so every every function here has some set of tasks okay so let's say if I want to select the first one a day okay I'll just remove this so all you want to do is just put one curly bracket and whatever you want to use so let's say the first one a so if I put the first character you'll be able to see Tosca shows us that what exactly this is for and how to use it so here if you see shows the first three letters of a day name a day is what the syntax should be and uh here example is also mentioned and the result is also mentioned okay now you have lot of functions here if I scroll it's a huge list here okay for performing different operations so here if you will see you you can use alt button you can use all clay a month apps be backspace okay and then uh operations like whatever keyboard operations you have it is having all the keyboard operations like F1 F2 F10 you can use whatever you want here okay now there would be need in which we need to like perform keyboard operations separately so we can use send keys so send Keys is used for sending the keyboard commands and here if you see send keys and then uh curly brackets Square curly bracket square brackets in which you will mention the keyboard command so whatever you want to use you can use it accordingly and the similar functions like click click on screen and all those sort of things are also mentioned here you can play around with the date date time day here you see uh sometimes you have to perform double click so you can use double click here drag drop you have Mouse operations Mouse over uh CM also what is their math operation is their random regular expression is there random text generation is there so we will find n number of options here to be displayed okay it I can quickly show one of the one or two on this so we'll we'll scan this particular page and this will be useful for the next chapter as well so we'll scan this I'll go to my modules so these all options are inbuilt which makes it very easy for us to use anything by default because they have done all the they've created everything and you can just use the functions accordingly so I'll use the first name the last name the zip code and we'll use the continue button as well okay I'll just move this thing here and we'll see okay so everything is unique and I'll write check out info page okay now since these are text boxes we can pass some function parameters here so I'll go to this and check out info page I'll drag and drop this into my test case and let's say this is this is a free form field in this particular application we should be able to enter anything okay so let's say my test case requires me to enter anything in the first name last name and zip code however I do not have to test data what they are saying is you run this test multiple times and enter some random data into this okay so here you will have a random function already inbuilt so here if you see random text is there okay and if I have scrolled Above This you see random text and the amount of characters you can mention in the square brackets okay so let's use this random random text okay and then square brackets let's say we want six characters and I'll close this okay now the moment you click X out of it it should display something like this which means it is correct in case it is not displaying like this you might you will have some kind of error in that so you can take a look at that so this should write some kind of random text on the first text box let's see how it executes see it has entered a random text of six characters okay now let's say I want to enter date into this so we have a inbuilt date function so if I put this d a t e okay uh there is a proper Syntax for this but you can use just date also so if I put date like this and if I run this I will just remove this and run this now so it should enter date in the first name uh most likely this application allows to enter anything so we'll see if it works so yeah this worked and just put in the current date right so this is how you can use the inbuilt functions provided in dosca as to however or whatever the business requirement need is there starting with the 16th chapter reusable tester block business parameters or libraries as well we call this now as the name States this is reusable in nature okay now when do we create reusable tester block business parameter or libraries in Tosca so let's first understand the concept so the thing is whenever a set of test steps are going to be reused at a later point in time at that point of time we should think about creating a Library okay now let's try to understand it with the application so we were talking about source demo.com so here you see let's say I have 50 test cases in which I am testing the internal functionality of ordering or something like that okay so in in all those test cases the common set of steps is going to be launch the browser launch this particular URL enter the username and password and click on login correct now instead of creating these as separate test steps it's just time consuming and not efficient so the efficient way would be I would create a library here okay which every team member can use for the remaining 50 test cases because every test case is going to pass through this login page okay in those cases the usable test step blog or libraries are created okay now does that only apply to login functionality no it wherever in the functionality you see that there is something which could be reused by uh reusing the different test steps uh different test cases we can create a library for this okay now there are two ways to creating a library one way is by just selecting the test steps so I'll quickly create a test case we already have the inbuilt modules so it would not take much time so I'll just try it Library RTD okay now two test two tests that are there so I will just say uh URL launching so open URL and we will use the input parameter so I have this login page automation so I'll use this okay now these two test steps are there in which first we are launching the URL and then we are clicking on the login page okay now what you will do is you will mention the URL here okay and in the login page you will mention the username and password so I'll write standard underscore user and I will write the password secret underscore source and I will click on the login method okay now since this is going to be repeated in nature we'll attempt to creating a library there are two ways to create it we'll first discuss the most efficient and then the second way as well okay now I want with these two steps so I can select these two steps and right click and here I'll be able to see this option create reusable tested block with business parameters so either you I can use the shortcut as well control n plus control P so the moment I click on this what will happen is it will create something like this arrow thing okay so that means that it is going to reference to a library so if I run this particular test case what it is going to do is it is going to actually go to library and see what steps are there and then perform those steps so that's how library is created okay now here the important concept of business parameters comes into picture okay now this is an important interview question as well uh what is business parameter okay so business parameter is basically a parameter which is created to give you the ability to input your parameters as per your wish in your test case okay now let me explain with the example in this particular application the set of steps are same however if you see that there are there could be some use cases in which we can enter different usernames okay and get different outputs uh okay so password is same but the username could be different okay now as a tester in this particular application I would want that flexibility to input the username in the test case using the library input the username in the test case as to whatever I wish for Okay so that's where business parameter comes into picture okay now if I create a test case and let's say I have created a test case here and I what I'll do is I'll just drag and drop this Library okay so the moment I drag and drop this Library you see the steps and all these things are not coming to picture okay here I am only able to see the business parameter okay so in this particular case or in case of any Library we are not concerned about what steps are inside that because that is taking care of this login functionality is what I understand what I need to do is I just need the flexibility to input the business parameters so in this case of username I can enter any other username as well logged out user okay now how does this work so let's understand this so what happens is uh when I have created Library using right click engines created with the business parameter what Tosca did is it has automatically taken a look into the test tips and it has seen what all parameters are there okay and what all input parameters it thought it has already created the business parameters considering all those items as input parameters however in real cases it will depend on your scenario but uh we would not need all the business parameters okay now let's say we we just discussed about this so we're only going to take username so what I'm going to do is I can I have the option to delete right click and just delete this from here okay so I'll delete everything from here and we'll just leave the username here okay now in case of open URL I'll go and here you see this syntax curly brackets PL URL and then close curly brackets okay so what happens is this is the syntax uh let's say I create a new business parameter here so I'll just cover that quickly here right click and I'll get this option create parameter and let's say I write test or something like that okay now let's say I want to use this business parameter in my test step so I can just rename this 2 curly brackets PL and then square brackets and then I'll write s here and I'll close with curly brackets now it is going to refer the value what has been provided in the business parameter okay now this was for understanding so we will remove the test parameter here and here we'll do in the open URL uh we'll change all this so I'll just put the source demo.com in the URL we don't need this so I'll delete this and in the login page we want the username so it has automatically taken the password let me just update it okay and in case of login I just want to perform a click X I will I can create a new test case just for a better understanding but you can use the existing test case as well okay so you can create any test case you can drag and drop the library what you need and in this case we'll part will pass just the business parameter so let's say I pass standard underscore user okay now if I run this it should be entering uh so it will launch the URL as well so I'll close this and I'll open a a blank browser and if I will run this foreign it is going to end enter launch the URL enter username password and click on login okay now these were only two set of test steps you will feel like why we have we created a library for this so this is just for demonstration purpose now there you can create a number of steps in this based on whatever your need is okay now this is one way of creating another way is if I go to any of the folders I can create a folder go to the test case right click create a folder and once my folder is created I can right click and here I'll be able to see the option called Library okay so this is the another way of creating uh the library I'll click on this and now whatever steps I want I can copy paste in this okay so let's say uh I'll take just any login page automation okay login page and I'll put in library okay I have to drag and drop this okay so once you've dragged and dropped you see this is going to be your reusable tester block and this is going to be your library okay now if this is created can I reuse it obviously you can drag and drop this thing but it is going to display all the steps now in case of creating business parameters how do we create it here so in the library you right click and so you go to the library uh not here so you go to the uh whatever the reusable desktop block is there and you right click and you will see this option called P business parameter create business parameter so you can click on this and here in case of business parameters is populated now right click and again you'll get this B option create parameter now you can create as many parameters as you want and then you can use the syntax what I was mentioning or you can drag and drop this thing as well so if I drag and drop this thing it is going to populate it here however it is going on top of that so if I delete this and if I put this thing here it is going to take the syntax what is required and I can use the other way as well so if let's say the password I want to drag and drop to business business parameter is going to by default create a business parameter password okay so that's how you create libraries uh there are going to be questions uh in case of interview or for understanding purpose like what is business parameter so business parameter is the parameter which is used in case of libraries for you to give a option of entering the value at the test case level as per your desired requirement okay now next chapter which is uh template creation okay so template creation test case design creation and instantiation these are going to be like contained into one particular topic because for us to understand this we we need to understand all these three concepts so what I'll do is I will create one test case and this is going to be chapter 17. so I can write template creation or whatever we want here so I'll just write template and uh yeah template is fine okay now let's understand when is this required why is this required and where shall we use it okay so in this particular application uh Source demo we come we login we come to this page let's say I click on add to cart and I click on this then I move to the checkout page and on this particular page you are entering the first name last name and zip code okay now let's take a scenario in which you are going to have 50 different test cases in which the flow is going to be same however in this particular page the first name the last name and the zip code is going to be different okay so we can understand it like this so like let's say first name is a and uh last name is s and the zip code is one two three four five six okay now we are trying to validate that this particular functionality is working for this particular user and then at different zip codes also it is possible so what is happening here is the test case which we are trying to understand is being driven by the data so that is data driven testing okay now that is achieved in this case using tcd template instantiation and all those Concepts which we are going to discuss okay now I'll just show you quickly how this application behaves so let's say I put to click on continue and then I'll click on finish okay so what I'm going to do is I'm going to quickly uh uh scan these pages so that we are able to perform all these operations okay so in case of template what I'll do is I will probably copy few of the things so we can copy or let's create it from the scratch it should not take much time so first I am going to launch so URL open URL and here I'm going to mention close this here I'm going to source demo.com is what my previous page was so I'll copy this I'll put this here okay and then I'm going to login so I can use the library as well but uh we can okay so I have the steps here so I will just copy the login page here okay and in the login page we'll enter the username and password so I'll just write standard underscore user and in case of password it was secret underscore source I'll click out of it now in this page let's say I want to add just this first option okay so I'll quickly scan this and I can just write here template tutorial I'll scan this uh I'm doing the set of steps for us to understand the tcd the template and instantiation and all those things in a better way okay so I'll click on scan here and we'll just take one of the products so I'll just take this add to cart okay now is this unique this is unique I'll go to add to cart and we have the stable elements we are good with this so I can write products products page okay after this I have to click on this cart link to move to the next page so I'll scan that as well I'll click on select on screen and I will take this link okay this is not unique so we'll see with what we can do it so this is a we do not have default name is there shopping cart link probably the class name is going to work so I'm going to use the class name okay so this is working I'll write card link and this is these are the two things which I need so I'll close this now after selecting this and this I would need to just click on checkout so I'll quickly scan that as well right click scan application and what happens is let's say I am scanning only one particular button here right uh just for the demo purpose but let's say in actual scenarios you have not captured everything and at a later point of time some things are getting added so you can always click the rescan option and add the additional elements uh I'll write your checkout page not check out pager yeah probably check out a cart page checkout cart page okay we just needed this button and this button is using this is using checkout is using looks pretty stable okay ID is there so we are good with this I'll save this and I will close this we'll move to the next page and here is where we are we are going to try to understand everything so I will go to the template scan application and we'll scan first name last name zip code and the next button I'll click on scan here and we'll try to get the first name the last name the ZIP code these are going to be our three input parameters which are going to be changed now everything seems fine I'll write checkout info page okay I'll click on Save close this let me enter some garbage value here click on continue okay some by default logout happened okay I will go to this I will check out put s value here I just need to click on finish so so we can click on we can just quickly scan this page as well right click scan application so this will give you an idea about end to end automation of at least one particular flow as well so overview okay Finish is so I'll click on this close this I'll click on finish and then I can close the browser I am just going to cross check once if it is not keeping the okay so uh I was assuming that this might this website might create a cache and keep it so we'll be closing the browser as well okay so we understand the scenario now let's go to the test case okay here I can import everything so I can just drag and drop this all these four pages and will quickly design our test case so I'll go to my test case I'll drop this in the template and here in the open URL we are good in the login page we have already entered everything in case of product we want to click on add to cart so I'll write click here and then we want to click on the card link right so let's rename the test steps as well add the item to the thought I will just copy paste here and I'll write here we want to click on the cart link after that right so I'll delete this and I'll put click here and then on the checkout page what I want to do is I want to click on the checkout so I'll click put click here okay I'll rename this to or we are fine with this now check out info page here is something you want to input values okay so after entering the values I want to click on continue so I'll click here well these parameters will talk about this and on the overview page we are going to click on finish so I'll put click here okay now after this I want to close the browser as well so I'll go to my template I'll search and ADD test and I'll write a closed browser or something close browser is there so I'll click on this I'm going to get added to my tester and we can put I think it is going to be swag Labs we'll just check in the dry runs okay so what happens is we have to understand in terms of template creation how to create a template first right so here what is happening is every step is going to be similar however based on first name last name and zip code our test cases are going to be different okay this is just for demonstration purpose not actual scenario but you will be able to relate it in terms of uh how the data driven testing works right so based on the data you need let's say 50 test cases okay now I can copy paste this test case and input the parameters hard code the value okay but let's say in future I have to change this so that is going to be a very difficult effort and not very neatly organized okay so for that uh templates are created T Series are created okay so what happens is since these are the three parameters which are going to change we are not going to enter this hardcore this value here how what we are going to do is we we are going to create a sheet for this okay now even though if I've named this as template right now I have not actually this is a test case this has not been created as a template for us to create it as a template what we can do is we can right click and we'll get the option to create a template here so not here give me one second so right click and we'll get the option in this convert to template so I'll if I'll click on convert to template what will happen is you'll be able to see this T option populated here okay and why have we created this because we want the data to be passed from somewhere else okay that's where the test case design comes into picture but this is how essentially you create a template this is how the template is created okay so we have covered how to create a template however the actual implementation of this we are going to see in the 19th uh chapter okay okay so I'll go ahead and start with the 18 chapter test case design creation okay so we have created our template now we'll move to the test case design okay we understand the scenario uh of the application which we which we just discussed like first name last name and zip code are going to be different okay okay so in case of test case design section and just in case you are not able to see you can go to home sections and from here you can click on this and it will populate okay now in case of test design section I'll right click and first thing is I am able to see that create a folder see you can organize the folders or you can create a test sheet so I'll go ahead and create a sheet here okay now test sheet is something like you can treat it like Excel where you input all the different uh data to be entered okay now in case of test sheet if I right click here the first thing you'll see there are going to be two different things in this one is called attributes and one is called instances okay now let's understand these things okay instance is can be considered as the number of different instances number of different times it is going to occur in that way you can understand and attribute is the property of it okay now I'll uh I'll explain that so if right click I'll click on this instance okay now we were talking that we are going to have 50 test cases okay now creating 50 test cases is going to take a lot of time so we'll just understand with three different uh test cases here and that can be expanded as to 1500 whatever the need of the business requirement is there so the moment I created it has created this particular row okay now I'll create one more and I'll create one more okay now here in the instances you'll see these are going to be your test case names okay now let's say our data was driven by the test case uh by the first name last name is zip code let's assume that those are going to be different regions okay so this is going to be your test is name so I can write like tc001 and I can write data driven and I can write let's say Asia region okay now in the second scenario let's say I want I'll write tc002 data driven and I'll write let's say America okay and in the third test sheet let's say I'll write tc003 data driven and I'll write let's say Europe okay now these are the instances which are created okay we'll understand this before this this is just the test case instances okay now I'll right click and I'll create the attribute so if I click on attribute it is going to be displayed with this circle thing okay now what are the attributes attributes are like the first name last name and zip code now let me explain it again so instances are the different kind of the areas which I want to cover so in this case we are taking Asia America and Europe those are going to be the instances however in those we would need valid data to execute our test case right in real scenario so first name last name and the zip code in our application is going to be the attribute okay now for us to create those we have to first create a attribute here right click and click on this okay now in case of attributes as well I am going to have three different names and three different first names three different last names and three different zip codes okay so I have to right click here and create instance inside the attributes okay so let's say here I'll uh I'll use just the country names as the attribute so I'll write let's say instances I can write here FN Asia okay and I'll write I'll right click and again click on instances and I'll write F in underscore America and I'll right click I'll write FN underscore Europe okay now what will happen is uh this attributes I have created for the first name so I can rename this attribute to first name okay now what happens is this is the attribute which is created and in this there are three instances which could be used now for us to use that I can since I've created the instances I can right click and it is going to display in the drop down now whatever I want to use I can use so if if I'll select F in Asia it is going to display here if I select America it is going to display here and similarly I can fill it all for my test is the same different whatever is your name you can select accordingly okay now just to keep it in view with this I'll first write select the Asia and in this I'll write America and this I'll use 0 okay now this is the first name instance attribute we have created now we have to create two more attributes last name and uh the ZIP code okay now what I can do is I can just copy paste this Ctrl C go to the test sheet Ctrl V okay okay so the copy paste does not work it seems here so let me just try it again okay it is not working so that means I have to create a new one so I'll click on attribute I'll write last name and I'll create one more attribute zip code okay now you have the option to enter the value directly here as well okay whatever value you want to enter you can mention that directly here as well however after creating instances it gives you a very flexible option to select it from the drop down so we'll take both the concepts here okay so uh the first name the last name uh here we have selected this and in the last name and the zip code will keep it same so let's say I'll write world and I can write the same thing here world world okay and in case of zip code uh all the zip codes are going to be different so I'm going to mention one two three four five six and probably here seven eight nine four five six some random numbers I'm putting okay now we have created three different instances here sorry there were four which were created so I'll I can right click and delete this but now it depends like how many number of instances do you need you can create as many number of instances you want this is you are designing your test case here okay so I can right click and I can create let's say one more instance okay I can rename this to whatever test case I want and then again I can put the details in this particular instance because this is going to be my fourth instance so here again I'll get the option so I can use any value and it will create my fourth instance but for this will just remove this to keep it clean okay now this is how you create your test sheet and here what we have done is we have designed our test case okay so test case design section you create the test sheet and in the test sheet you will find two options instances and attributes instances are nothing but the different kind of uh instances which we are going to need so in this case it is going to be test cases so first we have created for test cases and then we have created whatever attributes we would need in case of attributes we can always create instances inside them which is going to give us the flexibility of choosing the data easily in terms of changing in terms of managing it efficiently however if there is no need of that if that value is going to be static then we can enter the values directly okay and now these are the data with which our test case is going to get derived so next we are going to talk about how to how to integrate our test case design with template and how to create the test cases but this is all about how to create your test case design and how to uh create the attributes instances and all those things there are a lot of Concepts in this in terms of filling in the data the lot of advanced concepts are there but the portion what I have covered is good enough for you to get started and I've covered the majority of the test data driven however in case of advanced if you if you want to understand different methods are there in terms of filling in the data and all those things uh I'll be covering in different videos okay now we have covered our 18th chapter test case design creation so we have done the template creation we have done the test case design equation now we'll come to the 19 chapter instantiation and creation of the test instances okay to see our data the sheet is ready our test case is ready okay now in case I have not changed this as a template I'll not be able to associate uh okay so the first step is I would need to associate my test case design to the template okay so then it would understand that okay I need to refer the data from here and then create the instances accordingly okay now just one important thing if this is not a template and if I'm trying to associate these two then it is not going to work okay it's we can try to understand this why we have created templators play it is like let's say I have a template for a resume right and I have given it to 10 different folks and everyone is going to use that okay so everyone is going to create the CV using the same template however they are going to put in their own name on skills and own experience right so that's why the template is required and here all the data is there that is one example I can think of now in terms of associating this what we can do is uh I can just uh okay fine I was thinking of renaming this but we can just drag and drop this so you can right click and drop it to the template so see the I dragged it and I'm dropping it to the template the moment I move it here it is showing fine okay like uh it is allowing me to now the association between test case and template is done now in case we want to validate that okay actually the association has been done or not what we can do is we can right click on the template and here you will see the option jump to schema definition so if I click on this uh so if I click on this it is going to navigate to the test case design which we are referring so in case it is referring to the correct test case design we have linked it properly okay now for us we were having the need to enter the first name last name and uh zip code from the test case design correct so what we can do is uh in case of Tosca you can create a floating thing as well so I'll use that right click and you can float this okay and I can move this to this side and I'll go to my test cases and here I'll I have to let me move this here so that you can see clearly okay so we have three attributes right and we want to get this data from the test case design so what I'll do is I can drag and drop this thing to here so see I just clicked on this dragged and dropped this into the value section the moment I do this you see this particular syntax being popped up curly brackets Excel and then square brackets first name and input method here okay alternately in case you do not want to drag and drop you can write it as well so this was the first name this is last name so I can just copy so that I'm not making any mistake in terms of uh the spelling and I can write curly brackets Excel square brackets whatever the attribute name is there and I'll close the this bracket so Excel is used for referencing the value from the test case design and this is automatically selecting input so we are good and zip code I'll just put it here okay now what happened is my test case design created template created I have connected both of them and I have linked my data as well to refer it from here okay I'll close this now what has happened right now is our structure is ready however our test case has not been generated yet okay so first thing is your steps creation then template creation then test case design creation then linking I'm going to reiterate this as well again and now we have to create the test cases so see you go to the template and you right click and here uh one second so I'm just making sure that this is referencing to the right test sheet right I will right click on this and now we have to create the instances so what we were discussing about is we were entering three different data and based on that we are creating an instances so you right click and you click on these three dots okay and here you get the option to create the template instance okay just before that we should always check that everything is fine in our template okay and the linking and all uh Tosca also gives us the ability to check that so if I right click here you have the option to check template so if I'll click on check template if there is any issue it will say that this is something which you need to fix and since we are not having any issue to saying no errors found in template so I'll click on OK and I'll right click and I'll click on these three dots and see the moment I click on create template instances what it is going to do is it is going to give us this pop-up that do we want to start the instantiation now the moment I click on yes a folder is going to pop up here and this folder is going to have three test cases and these test cases names are coming from the test case design okay now design is somehow close so I'll just bring it back I'll go to view tools test cases once again section and I'll click on test case design now here if you see we have created these three different instances that's how this is created okay now in case of the first test case I'll expand this and I'll go to the test sheet see in case of first test instance I have entered if in Asia world and one two three four five six okay now if I'll closely take a look at the first test case which is created okay it contains all the steps and in this particular step if you take a look it is taking the exact data what we have passed here so if in Asia world and one two three four five six is coming okay however in case of America if I go to the second test case and if I go this checkout info page here you see FM America world and 789456 is coming okay so if I add one more instance uh we'll talk about that because there is one concept reinstantiation which we'll cover in this quickly okay so now our test case is created okay okay now wherever I want to run this I can use this particular test cases to run this okay so uh there should be a lot of uh different uh wait time because we have not considered uh like if the script could fail because of script lag or all those issues but we'll take a look uh I'll run this test case we'll see how it performs and will fix if there are any issues so it has launched the URL it is going to enter the username and password now the username and password is already part of the template now just clicked in add to cart and take a note on this if in Asia world one two three four five six and click on finish and then it will close the browser I have mentioned that uh we'll see if it performs we'll wait for this execution to get finished okay so we have some issue we'll see what the issue is but what we were trying to achieve is already okay so I was not sure uh initially what is the title of this the title is swag claps and I have mentioned swag not found let me go to my close browser you can mention this asterisk and this should work I'll just run this test step I'm just validating if it is going to work or not so it has worked for us uh it is that I have not I've just entered swag and this asterisk was missing the Wild Card okay now I can run this as to how many times I want okay for Americas I can run for Europe I can run okay now Let's uh understand another concept in it is going to be part of the instances as well which is called as reinstantiation okay now we have created the structure we have created template and all let's say I've created 50 test cases now there is a need to create more okay so what I can do is I can go to template right click jump to the schema definition okay and here in case of instances we were talking about 10 test case but in this case we'll try to understand this one so I'll right click and I'll create one more instance and I'll write tc004 and the moment I created this instance this section is popped up okay now I since I am referring the data from here I need to input the data okay so I can write any garbage value here I'll write any garbage value here as well okay now what I've done is I have added one instance to this I'll click on Save okay and I'll go to my test cases section okay here if you see in the template instance however I have added the fourth instance that is not populating okay because this instance does not know that I have added this okay in order to do that so what I'll do is I will right click on this and I'll be able to see the option called re-instantiate instance what does this mean is it is going to recheck again and if there is something updated deleted uh in the same instances or a new instance is added that is going to be taken care by this so latest updates it is going to take so if I click on this you'll see uh tc004 is going to get populated see this is populated so in this way we can add or let's say I wanted to uh just update few things in this that can also be done using reinstantiation but in case you're doing any changes in the test case design section you need to reinstantiate for that changes to reflect here it will not take be taken care of it automatically okay now let me uh we'll keep this anyways so just to summarize this concept from template creation to this three chapters so you create your test cases as whenever it is required now whenever Based on data things are going to change in those cases you create the test case design now for the first step is to create your test case convert it to template create your test case design input your data parameters and then link the template with the tcd by dragging and dropping the tcd to the template and then uh whatever your data parameters are there you will link those and then you will right click on this and you'll click on the three dots check the template that's fine then click on these three dots and then create that instance I hope this was helpful and in case not try to re-watch it uh wherever you have missed it but I have covered uh all three portions of this okay now we'll go ahead with the last chapter execution list setup now I have covered majority of these chapters for you to get an idea on how to work on automation testing using Tosca and I'm going to create more full-time tutorials as well based on the different topics which we have not covered but this is uh this is going to enable you to create the test cases and with all the basic concepts I have covered here okay now uh in terms of execution list setup let's understand that okay so you should be able to see this execution tab here however in case you're not able to see you understand it by now very well that you go to this uh home section and on the section you'll click and you'll be able to find this execution here okay now till now we were running our test cases in the scratch book so what happens is in case of scratch book the execution does not get saved okay it is used for debugging okay however the last execution we will be able to see so if I'll click on the scratch book here I'll be able to see whatever last I have executed but before that whatever I have executed is not going to be listed here and I'm not going to have able to see uh all those things so I cannot understand what all has happened so this is only used for debugging okay now in case of execution here you will create the list okay so it is very easy in Tosca you will find this sorry different things called execution list exploratory interactive and all these things we are going to discuss about different things at a later point in time but our focus is right now on the execution list so here you have few things you can skip these will understand how to create execution list so you just come to execution list you right click and here you'll be able to see the option to create a folder or create execution list so always a good idea to structure your uh everything in your project nicely so I'll create a folder first I can write a demo and right click and then create a execution list in this okay now in in case of interviews and all sometimes they ask the shortcuts as well so you can see for the execution list is Ctrl n plus control e okay now you can rename this execution list I can write foreign beginners course and here you see nothing is there okay now it is very easy you go to your test cases okay and I can drag and drop now let's say I want this instance so I'll drag go to the execution list and I'll drop in this execution list okay so this was the template instance and you see all my test cases are here okay now in case of uh like this was uh instance thing but let's say I want the normal test script I can just drag and drop this to the execution and I can put in this and it is going to create a so it has created a new execution list let me delete this because I've put it in this demo in case I want it inside this I can drag and drop this thing here or I can create different list here as to whatever my name is okay now in case I want to run all the test cases in one go I can right click and run using this or I can execute a single test case as well so let's say uh validate okay so this is closed so quickly run one so here the same option F6 is used so if I click on run what it is going to do is it is going to keep the log of this particular execution and you'll be able to monitor at a later point of time what all things have happened okay so we'll just let this execution get finished okay so our execution is passed here if you'll see on the left hand side now these are not displaying anything so that means it is uh not executed but here if you see it will give you the login info as well executing on Chrome browser uh and all these things and here if you see if I'll open this it is going to give me the time the date and all those things when it got executed if I click on this it is going to give me all the steps okay now if I make an execution again on this okay so what what we can do is uh what I'll do is I will just close the application in between uh so that we can see the failed test steps well so I can go to this and I'll do this so that this particular script fails so manually I'll just close the browser at some particular step okay we can close it here only so okay I will I will move the mouse okay so it was guys quickly it is very fast so I have done a keyboard command alt f4 so now it is trying to steer some value which is it is not finding so it will fail uh we'll just wait for the execution to be failed right now so in case of execution list you have uh you'll have the option of pass failed and no result as well these are the different options so here if you see if it is failed it will come as red and here if I go here it will say that whatever issue is there so no matching tab was found okay and now if I run more instances of this those all are going to get populated so I will be able to understand okay at what time what execution happened and how it how the structure looks like okay now in case we want to set different test configurations like in terms of browser and all changing and all that we can set it at execution list level or at this folder level as well now whatever I will Define here is going to take the most precedence in terms of execution we'll understand all these things in case you guys have issues do let me know in the comment section and specifically mention where and what issue you're facing and I'll try to help as much as I can but this is how the execution list is prepared now one thing to note is let's say you are doing some changes in your test steps here okay you can always click on this and update all in all those things but in case of execution list you will right click and you will find this option called synchronize now okay so in case you are doing any changes you should always come here and click on the synchronize so what will happen is whatever changes you have done here are going to get reflected here and then your test case is going to take the latest updated changes what you have done and get executed okay so guys let me know how you find this course I have covered all the 20 different chapters in this and this is a long tutorial so I hope this has helped in case this is a help do like share and subscribe and thank you very much have a great day happy learning bye [Music] foreign
Info
Channel: Corporate IT Education
Views: 16,904
Rating: undefined out of 5
Keywords: tosca, what is tosca, tosca automation tool, tosca tutorial, tosca tool, tricentis tosca automation tool, tosca tutorial for beginners, test management tool, tosca automation tool installation, tosca automation tool tutorial, tosca automation tool demo, #fullcourse, automation testing, automation testing tutorial for beginners
Id: v2gyFqMLPf8
Channel Id: undefined
Length: 196min 22sec (11782 seconds)
Published: Mon Sep 11 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.