What will you learn in this lecture?
In this video, we will learn about Sauce Labs desired capabilities. In the previous tutorial, we went learned the RemoteWebDriver.
Desired Capabilities
The other very important class whenever we’re interacting with Sauce Labs or actually this is for any selenium grid. However, this was for Sasan specifically because they’ve implemented their own grid.
But for any Selenium grid, you can do this kind of stuff you just have to point to your own localhost is desired capabilities now desired capabilities. If we take a look at this class it’s basically a way for us to tell how we want the grid to operate. So you can see that it has multiple different constructors.
It has these properties that you can set based on the version platform browser name javascript the Enable then except in secure sorts it has several static methods that you can call and it has several other methods as well.
So let me go back so you can see here is I’ve actually created a new desired capabilities object that returns chrome capabilities so you can see that while it returns the desired capabilities but it means it’s for chrome. So what that means is going to set the browser name equal to Chrome then using our capabilities object.
I can set many different capabilities using a string followed by an object type. So, in this case, I’m using this class called capability type and it’s called version and then I’m passing in the latest so I’m going to use the latest version of the Chrome browser. The next capability I’m setting is the platform. The platform is the operating system.
In this case, I’m using Windows 10 and so now this point you may be asking how do I know the strings to pass seen here in order to configure the capabilities. Well, Sauce Labs make it makes it really easy. Let me show you.
If you go to this you are right here.
This is called a Sauce Labs platform configurator. It’s an automated way for you to configure capabilities so I’m going to select selenium here I get to select a device lets say I wanted to select a mac I can put in a Mac and now get to select an operating system. Let’s say Hi Sierra and now I get to select a browser and let’s do safari version 11. So down here you can see that I have some code I can use in Java.
Any of these languages since I’m coding in C# I’m going to click this C# tab and you can see that now I just have to specify these values, in fact, I can just copy these lines of code and place them into my visual studio. And that’s how I know which values to pass scene in order to run on a specific browser or platform. And version it’s really easy just like that. They made automated and it’s super nice.
[Tweet “Learn these awesome desired capabilities in Sauce Labs. Check this out.?”]
Next Tutorial
In the next tutorial, you will learn about the overview of the solution.
What will you learn in this course?
This course is an introduction to Sauce Labs with Selenium webdriver.
Taught by Nikolay Advolodin, CEO of ultimateqa.wpmudev.host. He had been teaching test automation for 5 years and is the author of top rated online courses to 50,000 students in over 100 countries around the globe.
In this course from Ultimate QA, you will learn:
– Why Sauce Labs is an amazing test automation tool.
– Overview of Sauce Labs.
– Sauce Labs advantages and disadvantages.
– How to analyze results.
– How to perform live debugging.
At the end of the course, you will take a final quiz along with the answers to the quiz questions for better understanding.
Take This Entire Course for Free
[Tweet “Learn everything you need to know about Sauce Labs with Selenium Webdriver.”]