Introduction to Robot Framework

Testing World Infotech
A free video tutorial from Testing World Infotech
Working Professional, Having 9 Yrs of Experience
4.2 instructor rating • 16 courses • 49,048 students

Learn more from the full course

Learn Robot Framework (Selenium) from Industry Expert|22+hr⭐

Allure Reporting |Data Driven Framework| Python Coverage | Pycharm | Desktop & API Application coverage | GITHUB|Jenkins

21:59:11 of on-demand video • Updated January 2021

  • ** Able to do End to End automation on Web Application using Robot Framework ***
  • ** Decent knowledge of python to face interview questions ***
  • ** Detailed understanding of Python programming ***
  • ** Ready to write user defined keywords using Python Programming ***
English [Auto] Welcome to the wrestling world. In this session, we are going to understand what is a robot framework. So first we are going to a robot for introduction. Then I'll show you how robot framework is different from other automation tools. Like if you talk about selenium, if we talk about so how it's different and then I'll move to why a robot framework is so popular means what all the advantages we are going to get with the robot framework. So first of all, what is robot free world? So the robot framework is a generic test automation framework. What acceptance testing. Now, question here is why acceptance testing? Why not for system testing here in acceptance testing? We assume mostly business users are involved and they are not very much aware about the programming. So they want a kind of tool in which they can test or they can automate their testing without using much programming skills. And that is the recipe of this robot framework. You can take it robot framework as they are automation tool or later on we will understand it's not a tool IT celebrity, but as of now we can understand it as a tool which is going to provide US involvement in which we can automate application even without programming or some really required programming. So it will be very minimal programming. So it's a generic test automation tool for acceptance testing. Before moving forward, I'll just give you a very basic introduction how robust framework code looks like. So I'll just scroll down. And here I have taken the code of robot framework and same code in selenium. So if you check it here in the robot framework, we are not writing code in any programming. We are just using a predefined keywords like we have a keyword input user name here. We need to parse where and what input you want to pass. So if that is not the programming, if you want to do the same task in selenium, so you will have to look at Element and then send keys. So you will have to do programming in case of the selenium. But in case of the robot, remember it just a simple keywords. We are putting the keyword, we are getting the output. So here robot framework is a dabblers and text dabblers and text means we are providing the test case in the form of rows and columns which utilize keyword testing approach. OK, let me explain here. In the robot framework, we have a lot of keywords to perform different tasks. OK, I give an example if you want to open browser. So we have a keyword with the name Open Browser. We just need to write keyword and render. Keyword will execute automatically. It will open browser. So they have done code behind the scene and given us a key word. We are using a keyword and behind the scenes the particular code that they have written will execute. So here we need not write code for most of the things we already have the keywords. So if you understand here, this framework is following. The keyword driven approach means for doing almost all the tasks. We have keywords and we can use these keywords in our automation. So as I give an example, if you want to open a browser, we have a keyword open browser. If you want to take something, we have a keyword input text. We have click element. We have closed browser. So lofty words we are hearing we can use them to perform different tasks. And if you check, here is a very simple approach. You can easily understand what is written over here and you can easily test cases. But if you are doing the same task here in selenium, you must have understanding of the python. You must have understanding how to create object, how to call method. So here programming is mandatory, but if you talk about robust framework, programming is optional for most of the task. For most of the cases, we already have the keywords. But if for a particular task keyword is not there, then you'll have to write programming. So I can say 90 percent task can be done even without programming. So Robot Framework is a general test automation framework for acceptance testing. It has either to use dabblers and text which utilize keyword rewon testing approach next. So as I told you, we have a lot of keywords and these keywords are coming in the form of libraries, we have many building library, we have a lot of libraries available which you can install and use. But if you want to extend these libraries means as of now, we are taking example. I can do all the tasks by just using the keywords. But if I have a task for which keyword is not available or else predefined keyword is not available, in that case we can use either Python or Java to write our own keyword. So I can say like, OK, you want to open browser, you want to clear history, you want to work. And we don't have any keyword for performing all the tasks. So I can write a code for doing the task and I can use it as a keyword. And these kind of keywords which we are going to write in the different programming, we call it user defined keywords so we can be written either in the Python or Java. So we have seen example of the robot from a code and code in selenium. So you can check it here in in selenium or any other tool you must have programming, understanding. But here in the robot framework, we are just using the keywords and there is very less programming involved. Then I'm coming to. Advantages of the robot framework. So first of all, it is free means we did not go for any licensing for it. Then it's a devillers and textural to it text, so previously I have shown you we are just using a tablet approach if you check it here. That's my first column in which we are writing keyword second column in which you are passing data because tabular approach we are following. Then it's a fast development with minimum coding efforts, and that is one of the most important point, because most of the testers, most of the software testers are not expert in the programming. So they can use a keyword and right over here, even without programming or very or with very minimum programming. So that is the advantage of this framework before reporting with the detailed information that is also a very good advantage of it, offer execution. We are going to get a very detailed report and we need not to do any extra settings for that. So every time we execute our test cases in the robot framework, it will generate a report. Also, we are going to get detailed log files, which will be default generated, then Gendry to celebrities. So we have a lot of libraries which we can use. Like if I take an example, I want to add automate web based application so we have a library with the name selenium if you want to automate EPA. So we have a library with the name and request in the same way. If you want to automate anything on the system, we have a library with the name securely if you want to automate Engelhardt's application. So we have a library with an extended selenium to library. So we have lots of libraries which we can use to automate different applications. And that is again a big advantage of the robot framework. Then, as I told you, it's about web testing. It's about Windows, a database that, as I said, with that robot framework, we can automate many applications, many different type of application. And the next is distributed structure. Here in robot framework, we are going to distribute our code into different sections. So that is a section like DISCUSES where we are writing our test kits. Also, we have a section within Invisibles where we are defining our variables. Then we have a section keywords where we are going to read user defined keywords. So it's a distributed structure. We are distributing our test kits into multiple sections so the computer skills or the complete structure would be distributed.