Grid 4 - Types and Detailed Configuration

Selenium 4: New Features Selenium 4 - New Featues
1 hour 26 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$49.99
List Price:  $69.99
You save:  $20
€48.05
List Price:  €67.28
You save:  €19.22
£39.95
List Price:  £55.93
You save:  £15.98
CA$70
List Price:  CA$98.01
You save:  CA$28
A$77.04
List Price:  A$107.87
You save:  A$30.82
S$67.44
List Price:  S$94.42
You save:  S$26.98
HK$389.10
List Price:  HK$544.78
You save:  HK$155.67
CHF 44.44
List Price:  CHF 62.22
You save:  CHF 17.78
NOK kr556.72
List Price:  NOK kr779.46
You save:  NOK kr222.73
DKK kr358.40
List Price:  DKK kr501.79
You save:  DKK kr143.39
NZ$85.70
List Price:  NZ$119.98
You save:  NZ$34.28
د.إ183.61
List Price:  د.إ257.07
You save:  د.إ73.45
৳6,001.50
List Price:  ৳8,402.58
You save:  ৳2,401.08
₹4,222.56
List Price:  ₹5,911.93
You save:  ₹1,689.36
RM223.33
List Price:  RM312.68
You save:  RM89.35
₦84,537.08
List Price:  ₦118,358.68
You save:  ₦33,821.60
₨13,893.48
List Price:  ₨19,451.98
You save:  ₨5,558.50
฿1,729.40
List Price:  ฿2,421.30
You save:  ฿691.90
₺1,728.30
List Price:  ₺2,419.75
You save:  ₺691.45
B$290.56
List Price:  B$406.81
You save:  B$116.24
R904.38
List Price:  R1,266.21
You save:  R361.82
Лв93.87
List Price:  Лв131.43
You save:  Лв37.55
₩70,321.20
List Price:  ₩98,455.31
You save:  ₩28,134.10
₪186.14
List Price:  ₪260.61
You save:  ₪74.47
₱2,946.86
List Price:  ₱4,125.84
You save:  ₱1,178.98
¥7,723.73
List Price:  ¥10,813.84
You save:  ¥3,090.11
MX$1,023.24
List Price:  MX$1,432.62
You save:  MX$409.38
QR183.09
List Price:  QR256.35
You save:  QR73.25
P685.61
List Price:  P959.91
You save:  P274.30
KSh6,473.70
List Price:  KSh9,063.70
You save:  KSh2,590
E£2,483.19
List Price:  E£3,476.67
You save:  E£993.47
ብር6,258.40
List Price:  ብር8,762.26
You save:  ብር2,503.86
Kz45,623.90
List Price:  Kz63,877.12
You save:  Kz18,253.21
CLP$48,677.26
List Price:  CLP$68,152.06
You save:  CLP$19,474.80
CN¥362.39
List Price:  CN¥507.37
You save:  CN¥144.98
RD$3,026.05
List Price:  RD$4,236.71
You save:  RD$1,210.66
DA6,682.11
List Price:  DA9,355.50
You save:  DA2,673.38
FJ$113.79
List Price:  FJ$159.32
You save:  FJ$45.52
Q387.67
List Price:  Q542.77
You save:  Q155.10
GY$10,507.02
List Price:  GY$14,710.67
You save:  GY$4,203.65
ISK kr6,982.10
List Price:  ISK kr9,775.50
You save:  ISK kr2,793.40
DH502.26
List Price:  DH703.21
You save:  DH200.94
L911.81
List Price:  L1,276.61
You save:  L364.79
ден2,937.49
List Price:  ден4,112.73
You save:  ден1,175.23
MOP$402.62
List Price:  MOP$563.70
You save:  MOP$161.08
N$908.73
List Price:  N$1,272.29
You save:  N$363.56
C$1,838.13
List Price:  C$2,573.53
You save:  C$735.40
रु6,757.51
List Price:  रु9,461.06
You save:  रु2,703.54
S/190.76
List Price:  S/267.08
You save:  S/76.32
K202.16
List Price:  K283.05
You save:  K80.88
SAR187.70
List Price:  SAR262.80
You save:  SAR75.09
ZK1,384.85
List Price:  ZK1,938.90
You save:  ZK554.05
L239.10
List Price:  L334.76
You save:  L95.66
Kč1,219.85
List Price:  Kč1,707.89
You save:  Kč488.04
Ft19,758.62
List Price:  Ft27,663.65
You save:  Ft7,905.03
SEK kr556.42
List Price:  SEK kr779.03
You save:  SEK kr222.61
ARS$50,191.65
List Price:  ARS$70,272.32
You save:  ARS$20,080.67
Bs347
List Price:  Bs485.83
You save:  Bs138.82
COP$221,888.26
List Price:  COP$310,661.31
You save:  COP$88,773.05
₡25,529.79
List Price:  ₡35,743.76
You save:  ₡10,213.96
L1,269.10
List Price:  L1,776.85
You save:  L507.74
₲394,167.14
List Price:  ₲551,865.53
You save:  ₲157,698.39
$U2,140.09
List Price:  $U2,996.30
You save:  $U856.20
zł208.79
List Price:  zł292.33
You save:  zł83.53
Already have an account? Log In

Transcript

Hello everyone, in this video session, I am going to explain part 20 of selenium four that is one of the new features of selenium for Selenium grid for different types of using it and the detailed configuration space okay how to configure the Selenium grid for which is one of the new things here as part of the Selenium four. So, now, we are using Selenium three and still Selenium four is not yet officially released into the market Selenium four is officially not released into the market. Right. So as for today, the date is like November 9 2019. And still the Selenium four version is not yet released into the market. But we have this lynnium for Watson unofficially list in this mbn repository.

Okay, just search for the MDN repository. dot com and search for this selenium, Java and search you will get the this link. And in this you can see that there are three alpha versions of selenium four available here, right. The Alpha versions when they're still in the testing stage, we didn't get an stable version of selenium for it the last stable version of selenium three is 3.1 for 1.5 and after that, they started providing the Selenium four versions where we have only the alpha versions which are still in testing phase and they are not officially released into the market okay. Once this Selenium four is officially released, it will be available on this engine which will not orgy guys, okay. If you go to downloads, you can see here till now, the stable version of selenium is 3.14 1.59 which is officially released, but Selenium four is not yet released in there, right.

So Selenium four is a nutshell resistant to me and repository. And the two this are in the testing phase because Selenium for alpha one alpha two alpha alpha is testing phase, alpha one vertical is done. Now, FL again guys, whereas alpha two got release in July 2019 Alpha three in September 2019 in parallel to this in parallel to the Selenium for Selenium grid for okay apart from the Selenium for Selenium grid four also got released into the market okay. So, selenium grid for when it got released. So in parallel to the Selenium four which is an unofficially like religion a form of alpha versions The Selenium grid for is also listed in the market it's not officially announced it guys it is also unofficial only so how to get out to go to that Selenium grid for returns. So, simply go to Google guys search for Selenium grid for okay the search for Selenium grid for it will be provided with this link github.com Selenium HQ, selenium wiki Selenium hyphen grid hyphen for this click on this link GitHub link where you can see that they have released today In grade four, okay, and you can see that Simon Stewart one of the founding members of selenium has edited this page on last edited on April 24.

Okay, so this is the last time when this particular page got updated guys. So that means Selenium grid four also got a list in the same month of this. Ok, alpha one got released in April 2019. And in the same month, April 24, the Selenium grid for us, this page got paid in Selenium for great forward knowledge into the market. Okay, and not surely only it is there in the GitHub, it's not there in the Selenium HQ or some other place, okay. So you can try it out, okay.

You don't have to implement this in your existing we should not be implementing this in your existing projects. Okay, you can only experiment and try and see how the new grid for is working and what are the new features of grid for and all those stuff. Okay. So coming to the older Selenium grid, okay. I mean to the older Selenium grid And when I this is a latest that is Selenium grid for the older Selenium grid only used to work in a bind node okay. There used to be heard and multiple nodes one hub one hub right multiple nodes This is architecture right.

So, we used to have a single hub machine where the original automation code used to be there and there used to be other machines the same network on the network. Okay, so this hub used to distribute the automation test and as you go to them on different missions, same at the same time, right. So, the the use of radius to create this harbor notes platform where hub will distribute them different as let's say there are some dentists here, okay. 10 desks here, this hub This is hub base, okay? In the end automation tests are there in the hub instead of these tenses executing the same hub, what this hub will do is it will distribute the test here to test here to see out of 10 let's say five missions are good It will distribute like this okay idea ideal case will distribute two tests into the each machine and then as you run the different missions, so, the purpose of the Selenium grid is to distribute the test serasa different missions.

This is the older way guys, where we share one hub and that more nodes Okay, multiple notes like this, these are all nodes case Okay, whatever that we have is the nodes node, node. Node. Again, this is no different nominations, okay. having different operating systems and different browsers installed in them, okay. Now, coming to the latest Selenium grid, that is Selenium four. Okay.

We have three ways. There are three ways it only has here only one way. Okay. One ways one way of using the selling older selling ingredients How about multiple nodes okay are by not combination, but here there are three ways what are those three ways the new Selenium grid for the first way is standalone Okay the first way standalone way of using the Selenium grid for second ways I know foundation is like an old classical okay and the same whatever we have in the older Selenium grid that is there also is there in the Selenium grid for also the same one single happened multiple nodes combination okay. Third one is distributed in a distributed way of using the Selenium grid for so I'll explain what is standalone what is a binary combination what is distributed way everything I am going to explain this. Just bear with me this is this there are three ways of using the Selenium grid for that is standalone way Abend or combination way and distributed way.

Okay. I'm a little older version we only have one way that is 100 multiple nodes which are which we are already familiar with. Now coming here, in this page, you can see the three On a standalone mode, other one is how by node The third one is fully distributed okay fully distributed mode this has three ways. So what is standard on? Okay, let me explain it a high level is okay. The first way of selenium grid for is like, standalone way of okay.

Selenium grid for allows you to let's say you have a mission here okay. So generally in order to in order to use a Selenium grid we have to create a hub and load missions right but here for creating admission we have to open a command prompt right and in another command prompt we have to open the node. So in one this is let's assume that this is one command from this is nothing but command prompt right? Let's say you're opening one command prompt here, this is a command prompt. Okay, assume that this is a command prompt. Okay CMD and in this will be launching the hub and you will open another command prompt in the same machine in the same mission or different mission.

Okay, remote Mission or a mission and you will open a node like that okay like that you have to use multiple okay multiple command prompts for one of the comments from for opening the hub one of the command prompt for opening the node, but in Selenium grid for the latest Selenium grid for the first way that is the wave of using this as a medium grid for a standalone mode, okay, well first of all, what is standalone mode in this standalone mode, what you can do is the single machine, okay. You can open only one comment from for opening the for launching the airplane mode, okay at the same time you can do this, okay. So when you when you when you run the Selenium grid for in a standalone mode, okay, it will not only launch the hub base, it will also launch the node at same time, okay, you don't have to learn the hub separately and node separately.

Rather. You can learn the harbor note in the same machine at the same time, okay in a single command itself. can open the hub I know that is nothing but a standalone mortgage. Okay there is another mode known as upload mode right the second mode is hub node mode in Selenium grid for so it's similar to the older more ways Okay, there will create a wheel we'll have one command prompt will open one command property in one of the machine or Okay, well we'll we'll launch the hub and maybe in the same machine or different machines okay in the same machine or different nations we can open the command prompt to open the Novation okay node another comment from the to be open in the same mission or different missions to run the nodes Okay, here hub node combinations are there, here your whatever the test automation tests that are there in the hub will be distributed to this node machines.

And finally, they can get executed on different machines. Okay. There are also if you want you can open a command under the command prompt here and open in order here also in the same machine itself. Okay. Up to you, okay or suffer admission or submission but how by notes, single habit multiple loads can be open okay? The node can be in the same mission or different missions.

This is the second mode this this mode was already there in the older version of selenium guys that is Selenium grid less than four. Okay, from Selenium grid four we have this three more standalone event node and issue a fully distributed mode but in Selenium grid three or other grade two or grade one, we don't have this whole board space okay. So we only have this older Selenium grid, we only have this hub node mode combination, okay, third one is third one is the shoe fully distributed more or less, okay? They voted mode. So it's also like in this fully digital mode or more generally use this for customizing this okay. If you want to customize the way you are using the Selenium grid combination, then you have to use this customized way of that is fully this would add more.

The steps here are in full Addition motor Morty how to first set up a session then set up a distributor we have to set up a router okay? And then you have to finally launch a node Okay, so this is these are the steps guys, this is fully distributed more it's like you can customize things okay you can set up your session separately distribute that out instead of depending on the Selenium grid to do all this stuff, we manually set up the session that is required for Selenium grid setup the distributed that is required for the Selenium grid setup the router that is required for Selenium grid and finally set up the loader something like that okay. So for to get that how by node combination here, okay, fine. So, this is fully distributed mode guys, which is very new in Selenium four, okay. This is not there earlier even standalone also is not there.

So, this is a new Selenium grid for we have these two modes. Okay, Tony Awards. Okay. One one mode is like standalone mode. When using a single command you will learn the hub and node in the same machine whereas in fully distributed mode, okay, well a distributed mode you can customize a Selenium grid by setting the session distributor or trend on these two modes or the newly introduced modes in the Selenium grid for the older Selenium grid, we only have hub nodes okay. Only we used to have this hub bind multiple nodes mode Okay, which is already this This mode is also there in the new Selenium grid for this okay, but this is also there in order in the new Selenium grid for we have fully distributed mode and standard mode available fine.

So, these are the different ways we can use Selenium grid for okay we can run the Selenium grid for in the below different ways. One is standalone mode or by node mode and fully distributed mode. Okay. And there is some difference between the older Selenium older Selenium grid and the latest Selenium grid for where Have these other properties new properties a game that is that is detect drivers property for detecting the drivers in an automation Okay, I will explain you practically like where it what exactly these are for publish events and subscribe events okay while by practically demonstrating I'll explain how this the latest habit no combination is different from the older Selenium grid okay combination fine. Now at high level you got an overview like there are three modes in Selenium grid for that is standalone mode or by northwards and fully distributed mode. In this video session, I am going to practically demonstrate how to configure okay the standalone mode of the Selenium grid for and how to consider this how by node mode of this new Selenium grid for and how to consider the fully distributed mode of selenium grid for in a detailed Vegas.

Okay, detailed configuration I am going to practically demonstrate in this video session. Fine. So, let's get started with the practical mode. Okay, let me learn the eclipse ID I will be creating a Maven project and then then I will start demonstrating. Okay. So let the eclipse ID launch.

So one more thing before moving forward there is, as you already know, it's not a new thing, but it is an old thing. So using Selenium grid using Selenium grid, its purpose is to distribute the tests. Okay. So the purpose of configuring the Selenium grid Selenium ID is just a concept today, it's not a tool. It's just a concept or a set of configurations using which we can set up the hub and node machines. And we can distribute our tests.

Okay, the purpose of this Selenium grid is to what is the purpose is to distribute the tests across multiple machines, this is a purpose, okay, instead of executing the same tests in the same mission, if you want to use a test across multiple dimensions, then you have to configure this Selenium grid in your Project, but is parallel test in parallel testing possible parallel execution possible using Selenium grid The answer is no base okay. Using Selenium grid we cannot perform the parallel execution that is parallelization means executing the test one test two test three at the same time okay simultaneous ledger coding okay. in sequence execution test one will be the first test will be executed after test one then test after test two test three will base unit in sequence order, but here if you want issued all these three tests in a parallel way then this is nothing better panel execution is this parallel execution possible using Selenium grid?

The answer is the simple answer is no case there is it's not possible in Selenium grid Selenium grid purpose is to distribute the text across multiple machines okay the only purpose is not the purpose is not to issue the pallet ization but to distribute the data across multiple machines still after Selenium grid distribute this test across multiple missions that destiny will be executed in a sequence order only after test one test two test three like that okay. Even after Selenium grid also the same thing will happen only Selenium grid what it will do is it will distribute that across multiple machines, but how to implement this parallelization in parallel execution then parallelization is only possible with the help of test changes. Okay. So testing unit testing for framework you have to use this test engineer project, okay, where you can configure this test Angie to execute all these tests in parallel.

Okay, silent execution is possible with the help of test Genji anyhow I'm going to explain how to use a Selenium grid for this and how to use destiny for balance everything I'm going to explain practically guys in this session, okay. So parallelization is possible using testing g only. So, but testing you cannot distribute the test across multiple regions. Okay. Test Angie can support parallel execution but it cannot distribute the test across multiple missions. But how to achieve this both distribution and parallelization at same time.

The answer here is guys Lancer here is not to distribute that a standard same damn panel is good then we have to use a combination of selenium grid let's test Angie okay you have to use both SMG and selenium grid guys for both distribution of the distant pilot Selenium grid will distribute the test across multiple dimensions and tests and you will take care of the pilot illusion by let us have it distributed across multiple nations. While the test one is running here simultaneously test two will run here and test three will run here with the help of exchanges okay along with Selenium grid, we have to use s Genji sng will take care of the pallet distribution across multiple machines whereas Selenium grid will take care of distributing the test across multiple regions. So this is one concept you have to know guys before we proceed.

So I explained here, okay, now our Eclipse ID has launched. Let's close everything, whatever I have. So now let's create a new project guys. Okay, right click, new Maven project. So let's create this select this Maven project okay under Maven folder it is there next. Next Next do some project nameless that is for that always said for okay some set for project and say set for project so fine now let me repeat this same package name here okay yes change the package name to pack one and whatever if a group ID is not mentioned just give the same thing and then click on finish you see the man project is getting created Let's wait for this progress to finish.

Okay once this progress is done, we can open this Maven project. This man project will be ready after this progresses and Okay, let's take a look up Yeah, it's done now the progresses then now we can use this man and project it for Project is a project we are trying to create here I created here as you can see here this is a Maven project and we have this POM dot XML file and expand this SRC test Java guys under pack one, we have some sample tests already created just delete this race, okay, it's not required for us, right you can delete this AP test your Java now under this, okay, under this pack one package, create a sub package, right click on this backward package and say new and say package and say.is Okay. You see, these are base package. Back one is a parent package and another test package is another package okay sub package of this pack one.

So under this test package, I will create some tests here. Okay, right click right click on this a new sub package that is test package here and same new and you have to go here and see class in this class has something like test a click on finish and inside this test a class create a method guys that is public wide test a method okay? test a method I want to make this method a single test okay. This is a single test I want to further we have to use our notation like is that it is a notion of test Angie Okay. Is there a test annotation on the test end but when I hold the most on this area tests are not getting any emotions because sorry. For the most here, I'm not getting any exchange related import statements.

So what I will do here is I will go to this POM dot XML file, open this go to this MV and repository.com and search for exchange here. Okay and select this option. And as you can see here, the latest version of destiny here is seven click On the seventh and it will take you to the version seven page of the destiny copy this dependency tags for destiny and Kota this pondered XML file under between these dependency stacks there is already one dependencies available for Jade as we are not going to use Jade just rip remove that and in place of that phase, this particular copy paste this dependency is okay, this copy this distantly related dependency into this eclipse, despondent XML file okay here like this and now save it that destiny the jar files will be downloaded automatically and this project will be automatically configured this.

Now what is this session it is a dot java, where we created a method inside the test a class and we want to make this method as a test method in testing. So for that we have I have provided an annotation for destiny that is added test annotation, which will mark this particular method as a test method Okay, or the most on this every test. Now you'll see what the import statement import test from the test engine rotations Okay, select this option Now inside this type System dot out dot print ln Okay I will say starting is a method okay starting test a method and I will I will end this method okay I don't want to write the real code here for now guys I want to write some dummy kind of code okay which I want to see only output console for now Okay, I don't want to write some automation script here rather I want to create some Java program itself like when this particular statement will get executed, it will print starting test a method into this console and here it will say ending and then okay testing method ended instead method ended and here also you can say the same thing it will be good test a method started Okay, this has started and it has ended.

Since it will be very fast. I will add some thread dot sleep statements here. Okay. So it will take some time, some 3000 milliseconds that is three seconds I will do add throws declaration say which again notice as ready guys okay test is ready now what I will do here is I will say rightly new class and give another class that is test to be Click on Finish inside this test to be okay I'll create another method public void test a method and here inside the system dot out dot print ln s to be okay, same thing has to be method started, okay. And you can copy this also if required you want to this just change the stuff that's it. test to be okay just sit down and here say test me with a standard thread dot sleep add throws and test B method ended.

Here test a method enter and there's a method in And here testable method ended similarly let's create another class like tested three multiple classes I'm grading this Okay, there is a reason why I'm creating this many number of test methods okay? in here like I am creating three classes each class I have a separate test method here one test method to test method and that test method is coming up now okay inside the test see class I'm just copying this and pasting here Okay, here a test to see you and also test to see test to see metal ended and in between the starting and ending we have the wait time of three seconds that's to be test to see test a like that we have three classes now. Okay, close all. Now guess what if I run testing, only test you will be executed Right run this run this test a using the test Genji no okay.

So, can you just observe that only one test will be executed that is a testament that inside of this test a class will be executed tested with a static test method ended okay only one method got started and ended here What if I run the test to be run as okay. So, here it I forgot to mention the notation guys destiny a notation editor it has to provide before every method to make this method as a test method or the most important okay done. Now test to see also safety you know to make this method as a test method then only can exert this methods using the test engine Okay. Fine now if I run this test a wholly test engine will only run this or only this particular test inside this test a that is only tested method will raise you today. What if has to be done.

Only testimony will be executed Again, only test we after three sentences to be real and okay. But if only tested see, if I run only this test to see only the district will be executed and ended here. Okay? Then now what if I want as you add all these three tests together, how to do that? Okay, I want you to all these three tests together how to do that for that right click here on one of these tests guys and select this testing option and say convert to testing okay. So when you do that you will get this dialog.

And in this you can see test engine dot XML is coming here. We can rename also it's not a problem or if you want to keep you can also keep that's not a problem. Okay, let's keep this as station a dot XML for now. Let's keep the pseudonym like the same thing and test name also same. Okay, now say finish the session the XML got created open the session dot XML file, okay, which only has a single test which only has a single test Okay, that is a name this is test a, okay, name this test test test j and copy this. You had also mentioned comment as test a, copy this and paste here twice, okay?

This is just to be and this is just to see and just changes to test a test to be and test to see okay now we have three tests inside the session dot XML file, okay. So here we have passed the test that is test a, this is a second test that is, is to be visitor test status is to be inside this cert file of the session dot XML file. We have this three test test one test two, test eight SB SC, okay, package one dot test package one dot test, test a disaster class okay. This is a package on test dot test B. This is a part for the package one tester test see okay We have three test class files here okay test a test to be DC are in the same destiny dot XML. If I run this classes individually only one class will run.

If I run this test only one class will run here right only test is running an ending here. But if I run this test nj dot XML, which has all these classes mentioned here, all the mentioned classes that is tested spdc inside this messenger dot XML village you will see run sng suit as a suit we are running as you see. In the console, you can see the test method started. At estimated ended test we started as we enter as a starting now, this isn't enough, but is in sequential order this after test is completed has to be starting after test V is completed a C starting after test B's the C's enter, it's completing right. So but I want to execute this particular three classes at the same time. Okay.

Okay, I want a security test a test B to see instead of the sequential order, I want to execute at the same time simultaneously balances I want to do with the elbow test a test retest. So, as I explained, dilution is possible using Selenium grid or testing GS using what you have to make this test parallel. The only way is to use exchanges okay in testan g if you open the session dot XML file okay. In this century we have something known as symmetrical nanus parallel is equal to this okay if you provide this panel attribute with the value is this okay inside the suit file of the system d dot XML all the steps which are there inside this destiny dot XML will be done in parallel this okay all the best classes test methods which are inside the suit file of this test center dot XML file okay will be executed in parallel Okay.

All that is which are inside the suit of this messenger dot XML file will be included in balance because for this particular suit level, we have provided panel is equal test attribute value. Okay, so now save this and let's run this this time guys. This time that if Something will happen instead of your destiny starting this end extending destiny starting this way and being tested and starting test ending the sequential order. Now you see all the tests will be started at the same time and ending ended after something okay rightly on this test nj dot XML file. Okay after providing this panel is going to offer providing this panel is called test and running this distributed XML file is widely run as test and you should see guys their status, their status, same time finalization has started is after three seconds estimate the status has about ended.

Okay. So this is how penalization will happen if you simply add this panel is called Test Center at the source level of this session dot XML file. All the tests will run in the panel right? Okay, this is a simple example guys. Okay, fine. That's fine.

Now, panel thing is possible now. Now we have to move to the grid way upgrade exhibition links. Okay, we have to configure the Selenium grid. So in order to make this a treatise distributed across multiple nations, we have to configure this project with grid okay. Sanjay is already configured in this project and we are able to execute all this disk test in a parallel way. But distributed distribution across multiple missions is not possible, right?

Because this project is not in conflict with Selenium for So for that, guys. Okay, but guys, there are a few steps that we have to follow. Okay, so the first thing here is, we have to, we have to create some new package here. Let's create a new package base, lame, this packages base package and say finish. Okay, under this base package, right click, and say new class. Say, I will name this as base test class, and click on Finish.

And inside this business class, I'll create a method that is Public wide, okay, public wide open browser method. So these are the, this is a port for Selenium grid guys in New Zealand every day I would write this code, okay. And you have to say spring browser name, string browser name. Now, when this method is called when this open browser method is called if the browser name Okay, the browser name dot equals okay before these guys before this open browser and all this stuff, we had to do one more thing that is we have to say WebDriver driver is equal to null we have the same for the most and you cannot import this because driver is not at configured in this project. So for that you have to go to again you have to go to the MDN repository. Search for selenium, Java.

Select the Selenium Java from here and as you can see, there are three or four versions of I will take the latest alpha version of selenium for this select this and copy this dependency tax for the Selenium for here and open this POM dot XML file and under the dependencies tag just paste it okay now along with this change we also have the Selenium for version no okay save it and that's it. Now for the most on this WebDriver you see you got this import WebDriver no okay and make this public as public WebDriver driver is equal to okay let's make this public fine. Now we have the driver already Okay. Now I will I will create a method now as I said public wide open browser, spring shrink browser name okay. String browser name I will say. Now inside this method what I will do here is if the support for Selenium grid generally if you're confident in the Selenium grid, you have to take a policy Steps Okay, so now your browser name dot contains sorry, dot equals equals ignore case one method is there guys in Java itself okay?

It it's like caps case okay instead of like this browser name even you provide the browser name in capital letters or small letters it will compare that with the listing okay? If it is a chrome Okay, the browser name is in Chrome either you pass this chrome in capital letter or pass a small letter it will pass Okay. So now here, say now he or say browser name. We have to create capabilities. So you have to say capabilities dot okay since capabilities object is not there here. So what I will do here is inside this method I will say desired capabilities gap is equal to new.

I will create an update for desired capabilities in Selenium base, okay? capabilities and put a semicolon at the end and import desired capabilities. Okay, change to desire di as I already Kappa Bailey piece so anything different guys so yeah, it's giving some error so I just change it to whatever it's suggesting so this isn't desired capabilities. Okay, now we have the object created for this deep desire capabilities and we have this cab object. I will say cab dot set, set platform the autosave Okay, if the browser is Chrome, you have to set the platform as platform that any okay I'll just say platform dot any that's it Now we have to also set the browser gaze cap dot set. browser name.

Okay. So here browser name.to select Chrome browser, okay, CH er, okay, it's not coming. browser type guys, okay, browser type dot something like Chrome. Okay. Now else if elsif this browser name whatever the browser name you're passing to this open browser method is equal to that is equal ignore case if it is like Firefox browser in case of Firefox browser. You have to set the against the platform guys.

Okay gab dot set platform. Again, you have to say platform, dot any any platform, it can be Mac, it can be windows, it can be Linux, okay, any means anything, okay? If you want to give only a specific platform, you can give platform that Windows 10 All the stuff in the browser is already clear for us we are setting the browser perfectly set browser name that is browser type dot Firefox browser, okay. Now the type is Firefox, l six. Like this you have to create for all the browsers guys. This browser name dot equals ignore case.

And the browser is like, if you are giving IE browser, okay gab dot set platform platform dot any cap dot set browser name, browser type dot Internet Explorer browser we have to find it a OC is area this is a browser now lC lC is okay while opening the browser itself, we are passing the browser and we are creating the capabilities for the browser. Okay. But our platform and the browser capabilities we are creating here okay based on the past browser we are creating this L since browser name dot equals ignore case, if it is Edge browser, okay if it is Edge browser, I will say cap dot set platform here and say platform dot ini. And here I will say cap dot set browser name, the browser type dot h okay like this. Now the desired capabilities are done. And, in the same thing, what we are going to do here is we are going to create Okay here we have this WebDriver driver okay is equal to driver is equal to new remote web driver okay we have to say like this for the mouse and import this remote web driver okay from Selenium and it has two parameters one of the parameter is nothing but this cap base.

Okay cap and other parameter here is new URL you have to say new URL and in the brackets you have to provide the okay http colon double slash localhost colon 4444 slash WD slash hub. Okay, so guys, here one thing you have to okay import this URL from the Java here one thing you have to worry guys that is in the older Selenium Okay, the older Selenium grid we have to provide this Complete URL okay, but http colon double slash localhost colon 4444 slash WD slash hub. But in the latest Selenium grid, you don't have to pass this okay? After here is enough space. Okay, this is one difference you have to remember guys, okay? In the older Selenium grid, you have to pass slash WD slash up.

But in the latest Selenium grid, you don't have to pass this two things that is slash WD slash is not required. Now hold the mouse here. It's asking either to throw the declaration or surround with trycatch. I will prefer trycatch. Okay, done. Fine.

So here, we're calling the remote web driver and we are passing the required capabilities here. That's fine. Fine. Now this is one thing. Now what else we can do here is UI It looks good. And now, this is a base test case.

Okay? This is nothing better the base test. Okay, there's a base test and after each and every browser is open here. Okay, when the browser is open, it should be closed again right? For that I'll create another method in the same base test class along with this in parallel to this open browser and create another method here that is public wide. Okay, with browser browser method.

Here I will say is the rate is the rate after method, okay, this method will run after every test, import this after method from testing. And here say, driver dot, okay, which we can actually add more code around these guys. Okay? If Rayleigh is not equal to null. Okay, then create the browser can add this if you want okay if the driver is not equal to null you can create the driver. So, this method will be executed after every test is executed okay.

So, after every test is executed after the test method, this method will be called and if a browser is still open it will be closed, okay. So for each and every test that we are running here, the browser will be closed, okay by automatically by this after after method of exchange that is split browser method. Okay. So which offer method will run after every test method? Fine. Now we have these two methods that is open browser and after method, open browser is like a lot of selenium grid configurations are there here as you can see, so it's passing the remote WebDriver capabilities and then, okay, this URL is converting the Selenium grid here.

And based on the required browser, the required capability will be passed to the remote WebDriver. Okay, fine. Selenium grid we have to use remote WebDriver J's Okay, and where do we need to pass a capabilities like a monitor The platform requirements we have we have to pass that requirement to the remote web driver so that it will take Juda differentiation, okay, differentiation, fine. Now, this base test, okay these base tests need to be imported by this need to be extended by this test classes. Okay. So here testing, I will say extends base test.

Okay, so why why am I extending this base test having this open browser and get browser methods into this test a class, okay? Because once you extend this base test into this test a, okay, you can call the open browser method. Okay, you can call this open browser method directly you don't have to create this open browser in every test case, guys instead. Okay. Instead, you can simply call this open browser here. Open Rosa, and you need to pass them browser.

Okay, let's say I want as you go to this party test in Chrome browser. Okay, for that we have to do like this, it will open a browser Chrome. So it will call this open browser method. And since it is Chrome is browser name will be Chrome Chrome is matching this chrome so it will say capital desert said platform as any platform it may be windows Mac or Linux or Metro browser name browser name will be settled from and this can be positive this remote web driver today submitted okay in the load nation. Fine. Now this is testing After opening the browser.

Okay, after opening the browser, we can plan to do one more thing like you can say a driver dot get event give us some application URL here http colon double slash www.meliar.blogspot.com instead of three seconds I will use some 15 seconds today's okay so that you can see what's happening. Okay. So 15 seconds I am giving and again This base test should be extended to other classes also test to be okay, I'll copy this extends base test done, then test to see extends the base test sale and every method we will call this open browser method. Okay. And here I will pass Firefox browser. Okay what is good this particular test in Firefox browser?

So open browser and then I will say driver dot get here I will pass another URL http colon double slash www dot tutorials point praetorians. Ninja. Can you give any application URLs this ninja.com slash demo? Okay. So this is one application I'm giving and here also I'm giving 15 seconds. So Firefox browser tutorials ninja.com slash demo is Chrome browser aware.blogspot.com industry again, I have extended already with beta Just now as I extended with basis, I can use this open browser method of this base test.

So inside this test class, I can directly call it No. Okay, I don't have to create again, open browser here I'll say Edge browser, okay. Here I will say Edge browser and put a semicolon here. It will call center browser. Now here is a driver dot h. Now http colon, double slash www.sceeto.com. Okay, and here, instead of three seconds, I'd say 15 seconds so that you can see the demo, okay.

Now, the three classes are ready. Okay, the classes are ready and grid configuration to some extent is ready in the base test, okay, where in open browser you are creating the capabilities you are defining the capabilities and you are calling the remote web driver. That's fine. So now after these guys, there is still something to be done before moving forward. Okay. So once this project is ready, now we have to do few more things.

That is Let's say in your phone or in your in your machine in one of your folders okay? Let's let me delete this is already there but let me start from scratch. Let's create some folder like name this folder information anywhere in your innovation is just data folder like a jars folder Okay, inside this jars folder, we have to download few things. Like first thing is like we have to download we have this Selenium we know right how to get to the Selenium grid for page right in the Google we have to search for search for Selenium grid for okay simply search for Selenium grid for you will get this grid for link that is github.com Selenium HQ Selenium wiki Selenium grid formalism open this and scroll down a bit on this cylinder grid for page. As you can see there is some Selenium server JAR file available.

This is for Selenium server alpha is alpha version one okay? future is in future this may not be the page for using the Selenium grid. Okay maybe in the offshore website that Selenium HQ dot o RG all these steps will be there. Okay. We'll find out all the details there maybe okay. So, for now, since it is simpler Selenium four is still in alpha state and selenium grid is still in alpha version.

OK, you can go to this page of GitHub where you can get the current version of selenium server, okay. So we have to use Selenium we have to use remote WebDriver for that we have to use Selenium server case okay Selenium server is required for Selenium grid generally. So here in order to get the Selenium grid we have to click on this add on server chart link. It will download the Selenium server jar for test case. Okay. Selenium server jar, keep this showing folder in let it download completely.

This is one thing you have to download. So once this is downloaded, we have to like show in folder copy this guys Copy this okay copy this Selenium server which got downloaded and paste into this jars folder that you just created in your machine Okay. Now we have the Selenium server for alpha one in automation tomorrow this may not this is all from this testing phase only guys okay there is not a stable one tomorrow a stable version of selenium grid will be released okay in Selenium server will be released. So just download that at that time, okay the steps will be same, but only thing is that stable and non stable things matter. Okay, now fine. Now next thing is that we have to get the drivers okay.

For executing the Chrome browser we have we need the Chrome browser chrome driver. So where we can get the chrome driver says what is the official website of selenium that is Selenium HQ dot o RG go to this download tab. Go to this download tab and scroll down. And as you can see here, we have this Google Chrome driver. Just click on this latest okay On this latest so we have different things here. 7978 77 just check the district the current browser version.

Check the browser version here guys, that is a help I'd say about Google Chrome to see the current version of gold romney 78. So we have to download the the compatible Chrome browser version that is chrome driver 78. Okay, it's on the 78 and it will ask you for different options are there I will select chrome driver windows 32 bit, click on this. The chrome driver of Windows activity will be downloaded. Let's wait for it to download. Okay, once it got downloaded, go to the folder where it got downloaded extract this guy's extract here.

So we got this chromedriver dot exe file extracted from this chrome driver. So copy this and paste into this jars folder. Okay. It's not required No, none. So we have the chrome driver.ac and selenium server chrome drivers for the Chrome browser where a Selenium server is like for a great purpose. Okay, there is a server required for a great configuration fine.

Now the next thing is that we need to gauge the other drivers also like we still have the Firefox driver that is a co driver need to be downloaded. Then a driver need to be downloaded. Then Edge browser driver need to be downloaded on Okay, all this stuff. Let's go with another driver that is a co driver now that is Firefox for Firefox browser. Okay. So let's go back to Selenium hq.org download page.

Scroll down a bit. Now you will get this Gecko driver Mozilla Gecko driver is there. Click on this latest link. Scroll down. Okay, click on this is the latest version. Yes.

Okay latest version of Gecko driver. Scroll down a bit. And you can see here Gecko driver version 0.2 0.0 6.0 windows 10 32 is there just click on this will download the gecko driver no which is required for Firefox browser integration integrate. Okay. They did download once it is downloaded so in folder extracted here now you got the gecko driver dot txt file also loaded into the jaws folder where do you have the Selenium server available? Let's keep all this driver signed Selenium because Selenium server everything single jars folder in your machine guys okay in your machine.

Now the next driver that we need to get is IE driver. Again go to the official website of selenium that is Selenium hq.org slash download scroll down here we have the Internet Explorer driver server. So I will prefer that to be the version download a 32 bit version guys. So IE driver server is getting downloaded showing folder extracted here we got a driver also pasted here. All this stuff from downloads, fine now we have the three drivers and one more driver is just a case that is a big driver for a driver also let's go to the downloads page of selenium HQ dot o RG scroll down and here you will find something like Microsoft Edge a driver click on this, the process is a bit different for the edge driver guys. That is when you click on that it will take you to this Microsoft website of this edgy driver page.

Scroll down as you can see here, Microsoft Edge edge HTML, you have to check whether the browser version of Microsoft Edge is HTML 18 or 19 is available or not or that open the Edge browser in your machine case, just to cross check whether you have the similar version or not. Open the Edge browser. This Edge browser got opened guys, click on this. Okay and say settings. Just click on the settings and one settings are there. Scroll down and hear about this app.

We'll come here at the bottom you can see HTML of a diversity is there. Okay, so Edge browser version is edge html 18 is there so it is matching color now, since it is matching it's compatible now, scroll down and I have this Microsoft Edge HTML kind of thing will come here you see there is one command you guys okay. From DS I am not efe slash online slash add capability capability name Microsoft WebDriver some question is right. Now copy this here open this command from normally guys okay this will not work now okay this will not work now, when I paste this when I copy this command from here and then run this, this is not going to work this. See that when I base and enter you will get the elevated permissions error for from this what we have to do is in this file open in the command prompt, just type cmd into this search field and without pressing Enter directly.

Press Control Shift keys on your keyboard and press Enter Canada by holding the Ctrl Shift key on your keyboard after typing the CMD after typing the CMD into this box okay press Ctrl Shift keys on your keyboard and when they are inverted said that is Ctrl Shift buttons are in hold state press ENTER key yes okay. Now it will ask it will be open in your elevated state guys command prompt is going to be for that it is asking the permission so just do this test. Now you see the command prompt will open in the elevated state now copy this same command and as you go to this this time it will work as okay when you open this command prompt in elevated state that it will work to see now what's happening here. What this command is doing here this command is okay in this machine globally it is downloading the edge driver guys okay, you don't have to you don't have to manually download the driver this in this machine editable will be readily available now okay.

So, edge driver is getting downloaded and configured in this machine. So whatever the scripts that are getting loaded in this machine will be executed on the Edge browser. Okay, medically. So it Take some time guys so it will take some time for it to complete ah driver. Okay, so let's wait for it to complete. So the operation completed successfully guys, that means the edger driver is now readily available in our machine.

So we did that. So now all the drivers are done okay, all the drivers are done so now in the same JAR file we have the chrome Gecko IE driver and complete vision we have the ag driver and we also have the Selenium server also available. Okay, this is a process guys for the new Selenium grid. Okay, once this project is ready and once this jars folder is ready, okay, you need to do the same thing in the node submissions race okay if your separate node nations that is separate laptops are therefore not machines. Then you have to create a similar jars folder in the notes machines also with the same files okay. We must have the Selenium server all find out also like Selenium server JAR file IE driver, equal driver chromedriver.

Exe files and then motivations. Also, no matter how many notifications you have, that many number of this jar file should be there in each and every machine in each and every node mission. We should have this jars folder with this. Okay, this thing's fine. So the this is what we have to do before we get started with execution of the cylinder. This tests in the Selenium grid for Okay, I'm going to practically show you know, now let's open in Chrome browser guys.

So search for Selenium grid four and search for the Selenium grid for guys. The same page will come that we have got the last few searches github.com slash image for Selenium because Selenium grid for is there. Currently we have this grid details in this great GitHub Pages tomorrow it will be there in the official website, mostly. Okay, this page. As you can see, as I already mentioned in the beginning of this video session that there are three ways that you can run the Selenium grid run right Selenium grid For can be run in three ways one is standard mode. Another one is how by node mode and third one is a fully distributed mode.

Let me practically demonstrate each and every mode for you know okay let's start with the standalone mode, the standalone mode, the hub and node will be launched using a single make a single command okay here you see when I say this when I run this command guys Java iPhone jar Selenium server, okay, iPhone 400 dot zero alpha something okay, so before that just check the status says localhost colon 4444. If you run this nothing will happen here. Okay, that means isn't the side count to be richer we'll come here, but after running this command, okay after running this command, both a node and hub will be okay with a single command you are launching the node interface or by node are launched at same time using the single command. You don't need a separate command for launching the hub and you don't need a separate command for launching the node.

In hub a node. We have subnet financial uses a second mode we have this is for hub launching and this is for node okay there are separate commands for Hubei nodes but here in standalone mode you don't have to learn the hub and node separately that is nothing but standalone words okay. So in a single with a single command you are going to run the hub by nodes in the same issue okay if your your purpose is very simple where you want to learn the how by node and run them that in the grid kind of thing you simply have to use this command Okay, the server will be there at the root server will be there at the localhost colon 4444 Okay, but now it's not accessible. Once we run this command. You will see this page loaded with some details okay. They have to say localhost colon 4444 slash status this in general, we will get the details.

So for now we are not getting anything the site can't be reached will come. Okay. Now after running this command. So for running this command, let me open a command prompt cmd. For command prompt, don't open command prompt like this case. What you have to do is open this jars folder.

Okay, we're into this jobs folder in your mission where you have this chrome driver D co driver IE driver server and selenium server, select this and say CMD type cmd into the this box and press enter. So directly the command prompt will open at this location of jobs folder only. Okay, that a drive just for the record open. Now here you need to run the command is okay since this Selenium server JAR file is available, all the jars folder we have to run the commands from here. Okay, so for running the Selenium grid for in the standalone mode, we only need the single command which will open the hobby node at the same time. Okay, copy this command from here.

You don't have to do any changes. paste it here. Java hyphen jar Selenium server, iPhone four zero alpha and then standard on is there. Okay? If you want to find out if you don't want to run the standalone and if you want to simply find out what are the different commands that are there in the Selenium server, just press enter without that the standalone. You will get all the things you can use the district after this jar you can use distributed after this jar.

You can use a hub node router sessions standalone A lot of things are there right so like that Okay, so now let me run the actual command okay now let's run the standalone command is this if I pass a standalone command to this enter command it will on the hub in order to say okay let's run this and that's it will rise the hub and node case you see node is also added okay node is also added hub is also added okay. So, both the nodes and hubs will be added here is okay is in the single standalone command we can get the both the nodes and hubs launched. Now, if you if you refresh this like to say localhost colon 4444 slash status you will get some details No, you see, you got it. Right. There is some JSON kind of content is coming here, where where it is saying that Selenium grid is ready, and it has some notes.

Okay, it has some notes also. You see, I didn't run the notes separately, guys. Okay in standalone mode, I didn't run the node separately. This is a single combiner is good, where we got both happy notes in the same mission hub is ready and nodes are also ready guys. Okay. So in the nodes, we have all the capabilities since we have this chromedriver dot txt file in the jar, file, water, whatever we have chrome driver, Gecko driver a driver out there.

So based on this ex driver, he finds we got this from long cable This came, okay, Internet Explorer came Microsoft, he just configured his computer level. So it also came. And then Firefox also came like that driver, he files and Microsoft Edge. Okay, all came here. So if you run your test, the test may run in any of the sub browsers. Okay, this may run in any of your browsers.

As you can see in the test that Sal manually said open it in Chrome browser that has to be manually open in Firefox browser. That is see I said open it in at your browser. Okay. Like the different browsers I mentioned. Now Now since we have the webinar configured in our in my machine, okay using the standalone command, which I used for launching the hub, I know that the same time is a fast way of using the Selenium grid for Okay, while these things are running here are by no doubt running in this command prompt like this. Now if you run this session dot XML file, all the tests will be running in parallel and the same time they will be distributed across different browsers now you see a shiny suit.

So here you can see test to see est SP started guys. Now you see Edge browser started, Chrome browser started. Okay, this is the Edge browser guys. This is Chrome browser raise. Another browser should also start let's see whether it is starting or not. Okay, there are two browsers working or no.

So they may take some time Let's wait for them to do something. Nothing is happening so far. So I said 15 seconds, guys. So maybe it's waiting for 15 seconds when browser then driver or gate should come but let's see what is happening here. Okay, let's wait for some more time. You're still dining guys.

So in one of the things we said Edge browser and one of the things we said Firefox browser and one of the things he said Chrome browser. So, seems something is not working fine. So there is something going wrong here. Let me let me find out that to see what's going wrong here anything I did a mistake or something open browser Chrome, we say when there I ended it launch it actually okay it launched it properly, without any problem. So driver is not equal. London on liquidize say, Hi now this looks good for me.

But why is nothing is happening here? Let's find it out. Okay, maybe some time. So let's do one thing guys. Let's stop this standalone. Okay session Ctrl C controls, okay, you just have to press Ctrl C to stop this from running.

Let's start it again. Let's try it again to see what's going wrong there. Okay. Copy this again and again open guys I will again open this from here paste okay Java hyphen jar Selenium server, okay, just run it again, sometimes things may not work out. So you need to restart the server. Okay, you need to restart the Selenium server to make it work.

It started again let's see this time what's happening Okay, so in test a we are start we want to start chrome in test we want to start Firefox to see we want to start Ah, let's run this and see whether they are starting or not. Okay? Should you suit so in the Selenium grid in the standard mode we are we are trying to reduce a browser is launching and Chrome browser is also and let's see whether the Firefox browser or Firefox browser didn't launch lace. Okay, there's something happening with Firefox. So let's take something like a browser No. Okay, so and also let's add some thread dot sleep here.

Getting the title I will say thread dot sleep. I'll sleep for at least some seven seconds okay 7000 milliseconds that is seven seconds in each and every class I would argue is a test to B and C and also add this data devise a System dot out dot print ln. Without data sleep just add this driver dot get title so that it will be printed also add this thing to all the classes okay? all the classes Just to be clear at this stuff, just before the three dots let's just address Okay, there is not sleep second sound second set of dots if two things, okay? title, appropriate application title and sleep, tagline sleep, their title and sleep is their title and sleep is there. And here instead of the Firefox I'm going to die guys because something is happening with Firefox it's not opening.

So let's try with a you know, now run this and see whether these things are running or not in standalone mode. You don't have to configure the hub separately in standalone mode, everything will be in the same. Okay. So Edge browser opening this Edge browser is the Chrome browser. And this is the IE browsers Okay, three browsers at same time to see my seven parallely they are getting executed and at same time you see this one after another one is getting closed. Yeah, this time it got pass case.

Guys, is anybody still in the alpha state. So it is a testing state. It may not work by Finally for you, but this is how we have to configure and use it. Okay, it may take some more time for it to work better. So that's why I have to restart the server and a lot of things I have to do to make that things work out here, right? Fine.

Now, this is a standalone mode, we have other two modes ready like combine or modes. Okay, so close this, we can say Ctrl C here guys, which will stop this server from running. Now let's go with a second mode when we are going to consider the high notes separately. In standalone mode. You don't have to use a single command for hosting the hub and node it doesn't have a node only single command Java hyphen in that in Harbin moto comments Okay, once I have I in 101 for node, okay, so this is a traditional one anyhow, so copy this guy's properties. Go to the jars folder in your machine and CMD open this command from from the jars folder where we have this executable file and paste it here.

Java hyphen jar Selenium server. Here we are saying how good is your last In the hub Okay, using this you are launching the hub. The next thing is once the hub has been started here to start the suggest reference this refresh this localhost 4444 slash status, it will say Selenium grid is not ready because this is this node is not available yet, right, we only started the hub, we only started the hub so far. That's why it's saying Selenium grid not started, but one fist at this node. Okay, if you want to create the node in this hub nodes, you can create single hub on multiple nodes guys, if you want to start the node in a single machine, okay, in the same machine, then you can go with this command is if you want to learn this particular node from a different machine, then you have to go with this command.

Since I don't have multiple laptops, I will go with this same motivation, okay, I want to I want to use a node in the same machine itself. Okay. So if you have multiple laptops, you can set up that and then use this other command you guys use this other command for hosting from there. Okay. So now In the notes in different missions, this is a command for launching the node in the same machine where the hub is launched how to use this, this command. I'll copy this command because I don't have multiple missions to showcase.

Let me copy this Java hyphen jar. So new Python server. Okay, just copy this. I know this is one command prompt we're hubby's already running open another one another comment from from the same jobs folder we have openness. Here I will I will say Selenium server dot jar note I am launching the node and here I am saying get the drivers this all these drivers will be detected whatever the drivers who plays into this jars folder will be detected for some this command. This hyphen D if an icon did Taiwan drivers is viewing Selenium for guests which is not there in older versions of selenium grid.

Okay. So this will detect the drivers in your machine. Now the node has also started. Let's run this and see whether the scripts are running in the street or not. Okay. Run as a stranger suit.

This house By not combination guys. Second mode. Yeah, first browser got launched. Raise a second one. This is uh, okay, they got close also, okay. They got closed also so fine very fast.

We can run it again if required. Okay. So rightly kronus question ye suit is the first one. This is a second one. I'm not seeing anywhere. So sometimes it may work.

It may not work guys, it depends. Because you know, right this grid isn't currently in testing phase so things may not work as you are expecting. Okay, we see only two are running one failing is happening. We don't know why it's failing. Okay. It will working fine in the standalone mode, but it's failing in the okay.

It's gonna Have more. Oh, it keeps on changing guys. Let's see, let's try like a sock this edge. Let's give Firefox and see whether it will work or not. Okay. Right click run as test in the suit.

Yeah, it started chrome started. Firefox I don't know whether it will start or not. Okay, only two are working it again. Let's go install for Firefox let's give chrome itself so that let's say two things will start in Chrome and one thing will start in IE, okay? Right click Run as fast in a suit. Things are in a testing phase guys alpha state, so things may not work as you're expecting us equal to Chrome browsers.

Okay. So in one of the room and we have an IE browser already So 3101 omega and voila, Google and another tutorials. Okay, now this time they are working fine, it's working fine this time okay. They printed the titles also. Okay data is was printed fine. So this is like a hobby note combination.

And as I already told if you're hosting the hub by node in the same mission This is for hub and this is for horde in node in the same machine. But if you want to host a node in London or in a different mission, you have multiple laptops and you want to learn this node in a different mission then how to use this command here is how to use this command. Let me explain that Anyhow, I don't have multiple missions. I will try to use it in the same mission itself. Okay, copy this command from here, copy this command from here and paste it here. And as you can see here, didn't drivers The purpose is to detect these drivers.

And apart from that we have something like published events. These are new things, guys. Okay, publish events and subscribe event. are new in Selenium for rate. So it's like, you're you're saying that the hub is going to publish the events and subscribe. It is going to trigger some events.

And this node is going to subscribe or publish that event. Okay, so it highly technical, it's very technical, so you don't have to worry, you have to publish to these events of the hub and how to subscribe to the events of the hub. Okay, hub is already running guys. Okay, I was already running. Let's talk this hub in let's talk this hub a node ones. Okay.

Let's stop this hub a notes for that. Let's take it fresh guys because things may not work as we expected. So first thing is that let's start the hub login. Okay, let's start the hub login from the jobs folder you have to remember that from the jobs folder we have to do okay. So we have to start the hub and after the hub has started, then assume that this this machine is the other machine. Okay, this machine is a different machine and for different if you're in Admission you have to use this method right?

If you have multiple multiple machines and if you want to configure node in a if you want to launch node in a different mission then you have to go with this command copy this command, Java hyphen jar Selenium server okay drivers publish events and just copy that and paste it here for now. And data drivers for detecting the drivers and publish events and subscribe events I already told you Okay, there this node will publish the events to the hub of the hub and and subscribe to the events of the hub okay. And here instead of this hub we have to go view the hub you are higher up by IP address space okay, we should have this hub here to use IP address so when we can find the IP address of the hub, where we have started the hub in this machine, you will get some IP address here.

Okay. 192 168 zero dot. Okay, one zero to 192 168 zero dot 102. Okay, this is the IP address how to do this, okay. When you start the hub, it will give you the IP address. Yes, do the same thing.

One night They do dot 168 dot zero dot 1020 dot 102 Okay. You the same thing here itself okay. Yeah. So here are 424442 will be there again 4443 will be there by default anyhow copy this make sure that in your new automation also this jars folder is there with this EFC file and then now Selenium server JAR files okay and in from your Novation from your jars folder, you have to obey the command prompt again and then paste it and press enter. This is how if you're working from a different if you're if you want to set up the node in a different machine then you have to follow this process this variable to provide the IP address of this up which will be displayed in this command. Okay, here you'll see the IP address.

Here. When you learn the hub you will see the IP address given here. So How to use the same IP address to connect the node. Okay, it from the different machine as in assuming that this is from a different machine. Now let's run this. rightly so let me make everything as chrome so that Chrome is working fine from my observation.

So it will be easy for us to understand. Okay, so let's run right click Run as fast as you so three Chrome browsers should launch Yeah, it's failed because of some XYZ reasons. It failed you guys don't know what happened. Okay. against a fix failing, don't worry Ctrl C. started again. Yes.

Okay, started again. Things may not work like that. So simply go to this now iPhone jar. And then open this from the jars folder. CMD baystate hobbies getting launched. Now see whether you're doing any mistakes here.

Java iPhone jar from here to here. Just copy paste properly. Okay. And let's take a normal notepad guys so here let's give the IP address this is running on 192 168 zero dot 102 only Okay, let's do the same thing Michelle Fabio to you 192 dot 168 dot zero dot 102 okay 102 done do the same thing here also in place of give the IP address of the hub copy this and open another CMD paste it and enter the node will launch assuming that that this is from a different machine no it started just check the status here see whether things are ready or not using grid is ready because the node is ready okay. Without not the grid will not be ready guys. Okay, so looks like everything is good now.

See whether it will run or not rightly run as test in a suit Yeah, they started it seems so easy three browsers started okay sometimes it may not work guys you have to do troubleshooting like this only okay. So multiple browsers got launched and they will close in a while. Okay three brothers take long brothers find related clothes taking time Okay, so one thing God failed due to some XYZ diseases we don't have to worry guys you don't have to worry sometimes it will happen because the grid is still in the alpha state things may not work out as we are expecting but this is how the things are okay. Now the other one is like sometimes they work sometimes they may not work out to keep on restarting this hopper in Node space okay. If you are launching the node from the same machine, then you have to use this command for a band or more if you are launching the Not from a different machine then you have to give the IP address of the half days the way I have explained in this video okay, yes no now the last mode is fully distributed mode.

The last mode is a fully distributed mode so this is like a customized mode guys okay, so like it's like you manually will start the sessions you will manually start the distributor you will manually start the router Okay, in this you don't have to start any session router or distributed but here in fully distributed mode you have to start everything on your own Okay, you want to customize the stuff you have to give a port number for example, using this fully distributed mode you can What do you call you can actually set the session at this level Okay, you can run the things session, we can run the grade at this port level, okay, here no port is provided here. Here you have the flexibility of providing providing the port number where you want to run these things. Okay. So you can actually choose a port number where you want to run the things that is happened notes and etc.

Okay? So for that, for that we have to use a fully distributed node is where we can handle the session. So it's like a port port level also. Fine. Let's let me practically demonstrate now close all these things. Okay.

Ctrl C, is press Ctrl C, and stop the server side hub I nodes, the previous instances. Now we have the last one that is fully distributed one. The last one guys. So let's start and see what's happening. Okay. A lot of things are open here, let me close this thing.

Fine. I'm being from here so that things will be good and easy to see. Okay, fine. Now, let's in full let I'm now demonstrating the fully distributed moralize. This is a command first we need to set up the session guys for that this is a command. So again, you have to go to the jars folder cmd.

Okay, and paste it. The session is that you have set up the session notes session has started. Now the second thing what we have to do is we have to now set up the distributor okay and your shooting the distributor to this particular port This is only possible possible in the fully distributed mode this kind of customization copy this and again what are the jobs folder say CMD is this new comment from today's This is a new comment from where you're setting up the distributed distributed also started now two things are there one is session started another one is devoted started. Now, the third thing is then you have to start the router you have to set up the router for that this is a command base okay okay fine session you are saying that session is available it is 5556 and distributor you're to take the session from cipher five six that is this one and then distribute it to different port Okay, copy this and now again open another comment from from the same jars folder like this multiple command prompt co2 openness okay.

So And what is this? This this is one is like router router is also started in setup and status. Now refresh this and see what's happening here it is not ready because we have not configured the node it okay we have not set up an audit or launches an audit. So for node we have this Java hyphen jar. Okay? No data drivers okay.

Copy this, copy this again go to the jars folder. The nodes can be in your machine or in a separate machine if you're in a different separate nation video to view the arbitrary IP address as explained in the hub node combination, okay. So let me launch the node now. It will detect the drivers from the jobs folder and launch the node. Okay, now everything is there. Now refresh the local course poster colon 4444 slash status and see that you see Selenium grid is now ready with the node combination Microsoft Edge chrome IE and Firefox.

Okay. Everything is now sessions are fine now let's run this to see whether this is working in full distribution mode or not. We see three browsers launching it's working fine in the police would add more also. Okay for ladies what is what is a customized mode everything is working fine let's see whether they will lose or not. Let's see Yeah, what close to didn't get close it? Yeah, there's something going on there.

So it's not working perfectly but anyhow I was able to demonstrate to some extent, since this Selenium grid is still in alpha state, okay. It is not possible for everything to work as expected. So things may not be working sometimes they may be working sometimes they may not be working guys. Okay, let's wait for the stable version of selenium grid for to be released. Till then. This is the thing guys.

This is only For the experimentation purpose there in this video session explain how to use the Selenium grid for in standalone mode or by node mode and fully distributed mode. Okay, so this is one of the new features in Selenium four, where how practically demonstrated using the Selenium grid for like different types of selenium grids, grid forts, and then detailed configuration how to consider the things okay to get the things done. So that's it guys. That's it guys. The next video session I will explain other topics other pending topics of selenium 400 new feature sets, okay. So that's it.

See in the next video session, guys, thank you. Bye

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.