Transcript for:
Learning Selenium: Roadmap and Key Concepts

Hey everyone this is Mukesh Yotvani once again from learn-automation.com. Today in this video we are going to talk about how you can learn selenium. Again you must have seen I have recorded so many videos on selenium and I have covered so many different topics but people are actually confused from where to start and where to end. Especially for the freshers or especially those who are completely new to automation they don't know how to learn selenium. So again selenium is just not the only thing that you need to learn you know. when you start working on it or when you have to you know plan for a job change you have to learn so many other tools as well so what should be a proper roadmap in order to learn selenium i will just list down and i have video on each and every topic in detail okay so i will just show you how you can start how you can end and what are the points you need to keep in mind okay so let's get started so first of all as we all know that selenium is just an api or i will say it a small library that will simply help you to automate your browser now this library you can use with java you can use with python you can use with javascript you can use with c sharp ruby depends on which programming language you use so the first step is always you need to stick to one programming language if you are starting okay so again there's a very famous quote that do not run until you don't know how to walk okay so do not jump directly into selenium start with some of the programming language and then you have to Learn Selenium. So first thing you can start with either Java or Python or you can start with JavaScript or Ruby. For the time being, I will stick to Java because most of the companies are still using Java. And if you see the market demands also right now is on Java. Now, again, you don't need to learn everything from the Java side again because Java is very, very huge. OK, so first of all, you need to only learn Java, which is required for your test automation. OK. I will make a dedicated video on this like what are the topics you need to cover in java site so that you should not lose your path or track okay in one of my previous video also I mentioned like 80 percent like 20 percent topics we use 80 percent of the time right so as of now you initially focus on that topics okay that we are going to use for the test automation and once you get familiar with java then you can start learning all this and other concepts as well which will help you to grow in test automation so as of now stick to only the concepts that is required for test automation okay don't worry we'll make a dedicated video on this like what are the topics from java we need to cover now second point is selenium okay again as we know selenium is just a small library to automate your web browser okay nothing else if you talk about api no we have a different set of libraries if you talk about mobile automation we have apm if you talk about uh windows based automation again we have different set of library win app driver vinium and for api rest assured and postman and so other topics or i will say so many different tools right so as of now stick to selenium and as you know selenium only automate the web browsers so understand what exactly selenium okay What is the architecture of selenium? How you can invoke the different browsers? And how you can interact with the web elements? How you can capture certain attributes? How to work with the actions class? How you can deal with the desired capabilities how you can change the browser settings using chrome option firefox options understand the different switch to commands we have understand different timeouts that we have implicit weight explicit weight fluent weight then we have a page load timeout script load timeout right so again from selenium side we have very limited set of topics that you need to cover so don't think that selenium is very vast it's a very small library but very powerful okay so initially you have to focus on the i will say topics from selenium which we you which you will be using most of the times to automate your web application okay so uh if you ask me overall as i mentioned understand how browser works then different browser commands web elements commands okay how you can interact with the web elements then switch to commands timeouts desired capability chrome options actions class actions class which includes drag and drop mouse over click and hold release methods right so many advanced controls keyboard controls using actions class and then Then we also learn find elements method because find elements method is like one of my favorite method which we use most of the time in order to handle your web element or I will say to be more precise dynamic web element. So again I'm just giving you overview from the Selenium side that you need to learn. If you talk about specific set of topics I have one blog post on my blog which covers the topics that you need to learn. Once you understand Selenium then you have to start with. One of the desktop automation tool you can take auto-IT or sqlite or if you're working with python then you can use pyautoboing or you can start with taggyy the reason why i'm asking you because when you start working with your automation right there will be a couple of scenarios that will deal with desktop related activities okay like file uploading part that's a very common scenario that i'm taking in order to handle that you need these tools okay if you don't have autobiography either that scenario you cannot automate or you have to use some workaround okay again you don't need to learn all these tools completely just understand how you can use this tool to automate your one or two activity which deals with windows based activity and then integrate with selenium okay hardly one or two lectures will be enough for you once you understand java once you know how selenium works once you understood how these things can be integrated now start with one of the unit test framework okay you can either start with testng or you can go with j unit Most of the companies or I would say most of the companies which they have framework already in place they are using TestNG. So I would recommend start with TestNG because still 80% of the companies are using TestNG and TestNG having a lot of features which already JUnit have plus it has its own features as well. So I will stick to TestNG, learn TestNG and again in TestNG it looks all topics are little complicated but they are not. You just need to understand. what is this test ng how you can install in your eclipse how you can create one test case multiple test cases how you can prioritize them how you can run them in an order how you can create dependency how to run single test multiple tests how you can create test ng.xml file how you can run single list xml file multiple xml files how you can pass the parameters how you can run the test cases in parallel okay you can also talk about how you can use this testng for cross browser testing so again from testng the list of topics that you need to cover okay so that you should not You know get confused because testng again has so many features which personally we don't use with test automation So only learn as of now the topics which is important for you, which is important for your work Which is important for interview. Okay, one of the examples data provider each and every time or I will say each and every application you have to use data provider because you will be You know? doing the data driven test as well so data provider is one of the thing that you have to use from testng almost every time so these are the list of topics okay there are few more okay so probably if you want i can make a dedicated video on this also like what are the topics that you need to cover from testng side as well okay you can also learn about the listeners you can also learn about the assertions soft assert hard assert and this is how you can learn testng as well again it will take hardly three hours to learn testng trust me if you sit like ideally and start seeing all the videos of their official locomotion three hours is enough which is required for a test automation now once you understand how this thing works now you it's time to integrate selenium with distrungy okay so now whatever scripts you will be writing you can integrate them with distrungy and see how you can run them with distrungy now the moment you start working definitely you need to also deal about excel files right so excel files i will say or csv files okay sorry so csv files you can also deal with the properties files right then we have xml files then we have json files So now 5th step you need to understand how you can deal this external set of data Now this data is again I am taking file format but you can also get this data from the databases as well right Then you need to understand how you can deal the data from the external sources Again for each thing we have a different library in java You don't need to write code from the scratch just download this library and start using it For excel we have apache api if for cs you don't need a library you can directly go with java for properties file you don't need for xml json again we have libraries for database you can go with jdpc okay so once you understand this because we will be using data in our automation scripts as well right so once you understand how to read the data how to write the data then you can use the same data in your automation scripts as well you don't need to hard code the data guys okay because most of the people they hard code the data so whenever any test data changes they have to keep on changing their scripts that's a bad approach whenever any test data changes only change the test data not the complete automation scripts once you understood how to work with external files then it's time to understand maven as well ok maven or griddle these are the two build tool that we have in java so Again, if I say the most of the companies they are using and few companies are using Gradle, but if you understand the build concept will remain same. Again, you don't need to learn everything from the Maven because Maven is a complete build tool which DevOps engineers also use, which developers also use and we will also use the same. So first of all, we will also we will just understand what is Maven, why it is required for test automation, how you can configure it in your local system. how you can add the dependencies how you can add the plugins and basically how you can run your testng.xml files from maven okay so using maven just a small maven surefire plugin and you can run your automation scripts using maven okay so again you don't need to spend much time on the maven just understand what is the features that we need from maven in order to run our automation you can also pass parameters okay in case if you are going with bdd again maven will be used or greater will be used okay and once you understand the basic part then you can also understand about the profiles properties and other stuff which comes along with maven okay now once you understand maven i hope it is clear okay then you can start with git and github see this is the again i am just giving an order it's totally up to you if you want to follow this order or not otherwise you can start it with any order but make sure this should be your first step always you can't start working with automation without any to add experience to programming because the moment you write the first statement you need java okay if you talk about web driver driver equal to new ground driver okay if you don't start java or if you don't start with the programming you have to remember the syntax okay so It's very hard to remember because if you think only few statement you can remember that one but once you start right there are series of methods, series of classes, interface, enums that you need to remember but it would be good if you understand what exactly they are, how they work, what is interface, what is class, what is constructor, the first line of Selenium. Now if you talk about, let me just write it down. One example, okay. The moment you type webdriver driver equal to new chrome driver. Do you know how many concepts of Java is involved here? First of all inheritance, right? Then you can see this is a default constructor. You know how to create object. So this is a class, this is an interface, this is a reference, this is a keyword. Okay, so the first line of selenium itself has so many of Java cons. I say if you don't understand Java again You will lose the track. Okay, so make sure you take this first step rest everything like it's totally up to your you know Wish and your interest you can change these orders So you want to start after Java like how to read this because these are independent topic. This is independent topic This is independent. This is independent. This is also independent. This is also independent only these two parts are dependent okay make sure you start with java or python or javascript or c sharp or maybe ruby in that matter okay but then you start selling and then you can come to this path okay so get github again in github again it's a very i will say interesting tool okay so when you talk about um in kit and github you don't need to learn everything you only understand what is required for test automation how to pull the code how to push the code how to create the branches pull request merge the branches solve the conflicts how you can add the tags okay and how to work within a team and when it comes to github you need to also understand how you can create a repository how you can maintain the repository how to create organizations how to add ssh files how to handle the basic authentications and this basic pull request and merge request as well okay so once you understand this finally you can also learn about jenkins now again Jenkins is a very big I will say like so basically if you talk about Jenkins is a Java application right which runs on a web browser okay but we call this a CI server so understand what is CI server what is CI tool how it is important how we can use it okay then you use Jenkins with your automation okay so you will be having set of I will say testing.xml files that you are triggering from Maven that is now hosted on GitHub right so you will be running the same thing from Jenkins so this is what the flow again in Jenkins you can run the all the test cases on one system you can create multiple I will slave machines you can run on the slaves right so Jenkins also have list of topics that you have to cover okay so just a small disclaimer you must have seen that I am mentioning the topic that is not the only topic that I am talking about okay if I might have not added few of the important I will say topics or the concept that you need to learn but you got the overall point right that you don't have to learn everything from that tool Learn only which is required for a test automation. So if you need dedicated video on each tool, what are the topics you need to cover, please let me know I can make a video. But don't think that the topic which I mentioned that is the only topic. I'm just giving you overview that these are the very important topics that you need to learn from that tool. I might have missed few important points from Selenium, from AutoIT, TestNG, this part, Maven, GitHub, Jenkins. But the main purpose just to show you the roadmap. Okay, don't Start blindly. This is the one flow that you can refer so that you can get started with selenium again You must be thinking again why I have listed down all the rules because these are the standard tools that we use when you work with test automation Now the question comes how much time it will take if you follow proper path Okay, if you follow proper training YouTube videos Udemy courses or Any other way it takes 40 hours to let's say 45 hours to cover all these tools Which is required for test automation, okay? Now this is only you need to understand then it is up to you like how much time you will be giving for the practice So there's a very famous quote right that how do you eat an elephant? Think for a bit okay so answer is one byte at a time one step at a time so don't think that i have to cover so many tools how will i learn when i will finish all this no one byte at a time one step at a time start with java go with selenium this looks little complicated on the board but when you actually start writing the code okay when you start following the documentation it's very very easy okay so don't get worried about these tools which i'm talking about okay So that's all from my side. Again, I have not added few of the advanced concepts from the Selenium because this is just a roadmap to just get started with Selenium. Once you are familiar with all of this, then I will make a dedicated video like in case if you want to go later. advanced on selenium what are the things you need to learn okay so as of now i have not included selenium grid here i have not added any mobile automation which again very close to selenium because whatever things we are doing will be applicable for mobile automation as well how you can run the test cases on the different machines using AWS, GCP, Azure, Ali cloud how you can run the test on talker container these are some advanced topics that I will take in a dedicated separate video but this video is only for like who want to get started with Selenium minimum these are the set of tools you need now if you're fresher you might not need all of them but yeah if you know these things again you will be different from the crowd but if you are someone who has 3 years 5 years 8 years 10 years then these are the minimum set of tools that you need to learn Okay, and good thing like for each and everything I have a dedicated videos So I will link all these videos in the description of this video few videos are little old that I have recorded in 2014 2015 but they still relevant you might see some version changes You might see some syntax changes because of the version but concept will remain same Okay, so that's all from my side guys and in case if you think this video will help you or will help others Please share this video with others. If you're new to this channel, make sure you subscribe this channel like this video Let me know your thoughts in the comment section and I will see you in the next video. Have a nice day. Bye. Bye