[User] Please transcribe this text

[Assistant] Oscar, my baloney has a first name. It's O S C A R. I'm just so tired of everyone's shit at this point. Especially Ursula.


[User] Please transcribe this text

[Assistant] Ursula! I'm fighting Ursula, and my character swings at- at frickin' Glassface!


[User] Please transcribe this text

[Assistant] Like that. How do they even do that? I can't do that. When I do that, it goes above my head.


[User] Please transcribe this text

[Assistant] Stop cheating, Maya! You do this every time, Maya!


[User] Please transcribe this text

[Assistant] Akira, you're a freaking low level not boss guy. Stop wasting my time.


[User] Please transcribe this text

[Assistant] We don't have very many things in our world that are miraculous. I think people need miracles.


[User] Please transcribe this text

[Assistant] Hello guys, my name is Kaushik and welcome back to Lambda Test. In this video, we are going to learn a few concepts from playwright that is very special and makes the playwright very cool.


[User] Please transcribe this text

[Assistant] And followed by we're going to learn about the playwright reporters and we'll also see like how to take a screenshot or a video on the test failure or if you want to take the test reporter for each and every execution that is also possible.


[User] Please transcribe this text

[Assistant] And we'll also see like how to retry for a test if there is any exception, like if there is any failure. And lastly, we'll learn the auto weight mechanism of the playwright. So let's get started now.


[User] Please transcribe this text

[Assistant] So this is our test script we have written in our previous video. Like here we are getting the browser, then followed by the context and the page. And then we are just navigating to that particular site. We are doing some login and we learned about the new context and the


[User] Please transcribe this text

[Assistant] Uh, new page, like what is the exact use of that, right? So we are going to repeat the same, the login example, but this time we are not going to write any code, rather we are going to use the playwright facility or feature to do that. Okay. I'm going to bring up my terminal with the help of control plus J and here I'm going to say like NPX then followed by playwright and then followed by code gen.


[User] Please transcribe this text

[Assistant] So this comment is basically used to, uh, we can say like record the test or we can also say like to


[User] Please transcribe this text

[Assistant] Uh, generate the test script. Okay. So here you can see like we got the browser and here we got the playwright inspector. Okay. So by default it will be in the record mode. So what are the actions we are going to perform here?


[User] Please transcribe this text

[Assistant] That will be recorded here. So for example, first of all, let's copy the URL of this particular site. So I'm going to copy this.


[User] Please transcribe this text

[Assistant] And here I'll just paste and click enter. So we are just doing the navigation, right? So if you see this inspector.


[User] Please transcribe this text

[Assistant] The IDE, it is really good. Okay. So what we have to do is we have to first mouse over on this my account and then I have to click on this login, right? So I'm going to click on that login.


[User] Please transcribe this text

[Assistant] And here I have to pass my credentials. So that's going to be like, uh, caustic.


[User] Please transcribe this text

[Assistant] And here I'm going to give my password and then I'm going to click on this login.


[User] Please transcribe this text

[Assistant] Once the page is logged in, I'm going to click on this, like, edit your account information. And here my first name is like let code Kaushik. So I'm going to change that. Like here, I will just date the existing value and I will just name it like Kaushik. Okay. And then I'll click on this continue.


[User] Please transcribe this text

[Assistant] And once again, I will mouse over and I will do the logout. Okay. So that's it. My task is done now. Okay. Now let's see the code. So here, if I expand this or maximize this in playwright inspector, here you can select, we got all the code.


[User] Please transcribe this text

[Assistant] And here you can select, we have like playwright test. That is what we are learning now. Apart from that, if you want the Java code, you can get that. If you want the JavaScript code, you can get that.


[User] Please transcribe this text

[Assistant] And that's it. Now let's go to our VS code. I'm going to create a new test file here. Let's name it like recorded.


[User] Please transcribe this text

[Assistant] Okay. And I'm going to paste it. I'm going to save it. Now I'm going to close this code gen browser as well as the inspector. Okay. Now, if I go up here, first thing you will notice something different is like here directly, we are saying like page.go to, and we are traversing to the URL.


[User] Please transcribe this text

[Assistant] In our previous video, we learnt that we have to launch the browser in this way, right? This is correct.


[User] Please transcribe this text

[Assistant] Like, uh, you don't have to use this always in case that is the beauty of playwright test runner. Okay. So here, if you see here, we are using like parameter where we are getting the page. Okay. This concept is known as fixture. We'll talk about this in detail in our upcoming videos, but as of now, just for the learning, remember that always we don't have to write this lines of code.


[User] Please transcribe this text

[Assistant] So from here, right? So this page is basically the new page from the context context is from the browser, right? We got the same page object from the


[User] Please transcribe this text

[Assistant] Uh, fixture directly. Now I will repeat once again, do not worry about like what is this page where from it's coming and what is fixture.


[User] Please transcribe this text

[Assistant] It's a really easy concept. I will try to make it more simpler in the upcoming videos. Okay. So from now onwards, we are going to use this kind of test and here we'll just directly use the page. We won't repeat this three lines of code here. Okay.


[User] Please transcribe this text

[Assistant] So let's go and, uh, see how does this executes now. So if I go to my playwright.config here, we know that within the test match, we have to specify the folder and then followed by the file name.


[User] Please transcribe this text

[Assistant] Uh, in my case, this is going to be like recorded.test.ts. I'm going to copy that and here I'm going to change.


[User] Please transcribe this text

[Assistant] Okay, now I'm going to bring up my terminal control J and here I'm going to say like NPX playwright.


[User] Please transcribe this text

[Assistant] Then followed by test. To execute the test, we have to use this command.


[User] Please transcribe this text

[Assistant] But if you see the taskbar, I'm not getting any browser. Okay. If you remember in our previous video also, I said that.


[User] Please transcribe this text

[Assistant] Playwright by default runs in the headless mode. That means it is executing, but we cannot see the graphical user interface, right? So to fix that, what we have done is like here within the launch option, we have said like headless false. So we are going to do the same, but in a different way.


[User] Please transcribe this text

[Assistant] So go to your config file and here we are going to add a comma and then followed by, I'm going to use this property called use. And within that, within the object, I'm going to say like headless and then followed by false. Okay.


[User] Please transcribe this text

[Assistant] As I said earlier, playwright.config.ts file is basically like configuration for across all the test. So whatever we are going to do here, that will reflect to all the test. Okay. Now here we got some failure and that's absolutely fine. We don't have to worry.


[User] Please transcribe this text

[Assistant] Expand this and let's see. Okay. So here it says like, uh, we are not able to click on this login button. Why in the sense? Like if I show you my code base.


[User] Please transcribe this text

[Assistant] We are navigating to that particular site and straight away we are clicking on this login. But what we have to do exactly is, uh, we have to.


[User] Please transcribe this text

[Assistant] Capture all the actions, but I think if you compare with any other tools, it is really good. Okay.


[User] Please transcribe this text

[Assistant] And before logout also, we have to do the same. So I'll just paste this here as well. Okay. So I hope you remember the UI or else let's run this and see one more time. Okay. So I'm going to bring up my terminal once again, and I'm going to run this time. We can see the browser as well.


[User] Please transcribe this text

[Assistant] So here is my application and it's going to do the mouse hover on the my account and then it's going to click on the login and then it's going to, uh, do the login very quickly and it went there and it typed the name and it logged out. Okay. So that's very, very simple and it's very, very easy.


[User] Please transcribe this text

[Assistant] So here if I go, uh, if I walk through the code, it's very simple actually. We'll go to that particular site. We'll mouse over on this my account and here we are finding the login text and here you can select some weird kind of, it is not xpath. Basically this is not also a CSS. This is a playwright, uh, locator engine we can say like.


[User] Please transcribe this text

[Assistant] These are like, uh, specific to the playwright locator. We cannot find this in the chromium browser. Like we cannot like the way we used to find the X path. We cannot do the same with this locator, but there is a way to find this locator as well in playwright. We'll talk about that in our upcoming videos. Okay.


[User] Please transcribe this text

[Assistant] And here you can select, we are going to click on this email address because I clicked on this on that text box. So it's taken that action as well, but we know this is not a good, but we'll just leave as, as it is.


[User] Please transcribe this text

[Assistant] And here you can see like once I entered my email, then I have click on the tab. So here the function is press and then forward by you have to select tab, enter.


[User] Please transcribe this text

[Assistant] Control, control, plus shift. So whatever the actions you have to give, just give in the terms of


[User] Please transcribe this text

[Assistant] First assertion in playwright, we'll talk about this in our next video. As of now, just remember like this is kind of assert in test ng or if you know playwright, I mean protector, it is like the same expect. Okay.


[User] Please transcribe this text

[Assistant] And then we are clicking on some edit information and again we are filling the first name.


[User] Please transcribe this text

[Assistant] And we are clicking on the continue button and we are doing again a verification and we are mouse hovering on the account and we are clicking on the sign out. I mean log out. Once that is done, we are checking the, uh, some verification step.


[User] Please transcribe this text

[Assistant] Based on the URL. Okay. So that's it. Very simple. This is the recorded feature recorder feature of playwright, which is very neat, clean, and very useful at times. If you want to save, like you don't want to write the whole script, like for a simple screen at least you can use the recorder. Okay.


[User] Please transcribe this text

[Assistant] Now let's move to the next topic. Let's learn about the reporter in playwright and it's going to be very simple and there's a wide variety of reporters and it's going to be very simple. You don't have to write any code. Okay. So go to your playwright.config.ts file and or js file. And then here we have to give like reporters.


[User] Please transcribe this text

[Assistant] And here we can see like we have plenty of reporters. For example, we have like dot, line, github, json, junit and html. Okay. We are going to focus on the dot and the html and also the json. Okay.


[User] Please transcribe this text

[Assistant] So it's basically an array, within the array we can give like array of uh, data's. So here I can say like first one it can be like dot and then followed by again I can give one more data which can be like uh, JSON.


[User] Please transcribe this text

[Assistant] And then I have to say the path here. So within the array we'll say like json and then within the object we'll say like.


[User] Please transcribe this text

[Assistant] As my file name dot json. Okay, so this is going to be my folder name, then this is going to be my file name and this is the extension of the file. Okay. Similarly, we can have our, uh, stml as well. So here I'm going to say like one more array and here I'm going to give like stml.


[User] Please transcribe this text

[Assistant] And then within the HTML also we have plenty of options, like you want to open the file, uh, like if we give like always, that means like after each and every test, the report will open itself. I'm going to give this as of now, other than that we have like never, that means, uh,


[User] Please transcribe this text

[Assistant] That means a reporter won't open by itself. We have to navigate to that folder and we have to open it. And if there is any failure, we can use this as well. Okay. So I'm going to give never as of now. Let's see later on.


[User] Please transcribe this text

[Assistant] How to open it manually. Okay. So that's it. This is the reporting part. Okay. Now what I'm going to do is I'm going to bring up my terminal again and I'm going to execute the same test. Let's see.


[User] Please transcribe this text

[Assistant] Okay, so the test is completed and here if you see we got a new folder called playwright-report right and within that we have like index.html. Okay, so let's open this file in our explorer.


[User] Please transcribe this text

[Assistant] And here if I go within that, within that I can select index dot, uh, stml file. So I'm going to open that in my Chrome browser.


[User] Please transcribe this text

[Assistant] And this is how the test result is going to look like. Okay, so if you click on this test and here you can see like we have like multiple steps, like what are the steps we have followed. So we have navigated to that particular site. Then we have done some hover action. We have click on the login.


[User] Please transcribe this text

[Assistant] So like we have like before hooks and the after hooks. So if you are familiar with selenium, I mean cucumber, you already know like what is hooks, right? Which is like something runs before and runs after the test.


[User] Please transcribe this text

[Assistant] So here we have before hooks, like, uh, it will open the browser context and here we have like after hooks.


[User] Please transcribe this text

[Assistant] Which will close the browser context. Okay. What are those in the sense like we will talk about that more in detail in while learning the fixture. Okay. So just to give you some glimpse about it, like here we are using this page, which is like your fixture concept.


[User] Please transcribe this text

[Assistant] And here we are not opening the browser and after the end of the script, here I'm not closing, right?


[User] Please transcribe this text

[Assistant] But if you see this login.test here, I have opened the browser and also like, uh,


[User] Please transcribe this text

[Assistant] I didn't close actually, but we should do the closing. Okay. The open and close will happen by itself. That is the beauty of this whole concept. We'll talk about that more in detail in our upcoming videos. Okay. So we got the, uh,


[User] Please transcribe this text

[Assistant] HTML report, it looks very simple, but we can do more on this. We'll come back to this in a moment. Okay. And here if I, uh, go and here we got one more folder called JSON reports. And within that we have got the JSON report, uh, dot JSON asset.


[User] Please transcribe this text

[Assistant] And then we have three options. You can off by default it's off, it won't take any of the screenshot.


[User] Please transcribe this text

[Assistant] Here also we have like four options, off, on, on first retry and return on failure retry with video. Okay, so we have like five options. I will go with the on and probably I will show you the others demo in a while. Okay.


[User] Please transcribe this text

[Assistant] And yeah, so this is not a prop, uh, we can remove this as a string. Yeah. So video and then forward by on. Okay. Now let's go and run this one more time. Let's see.


[User] Please transcribe this text

[Assistant] And by the way, this playwright reporter folder will delete and it will recreate for each and every execution.


[User] Please transcribe this text

[Assistant] So the entire test won't like stack up, uh, basically it will try to create new reporter for each and every, uh, test. When I say every test in the sense like it's not like for each and every file, it will create a, like for every entire test suite until it executes and complete, it will keep the record.


[User] Please transcribe this text

[Assistant] So here you can select, we have a command like npx playwright show report. If I give that, it will open up the report in the browser, but already we know that this is going to


[User] Please transcribe this text

[Assistant] Uh, within this folder, it's, it's going to create the test reporter. So we can just navigate there and we can click on this index.html. Now here you can see like, uh, we got this screenshot.


[User] Please transcribe this text

[Assistant] Screenshot it will be taken after the test. So this is our last step, right? So we have logged out from our account. So we got the screenshot. If you click on this link.


[User] Please transcribe this text

[Assistant] It is like out of the box feature. Okay. So I'm going to play it and I'm going to expand this as well.


[User] Please transcribe this text

[Assistant] So you can see like what exactly happened. So here it moves over on the, uh, my account, then clicked on the login. So what are the test steps we have given? It will just record the entire test. Okay. So that is the really cool feature of playwright. And I think this is very, very useful in case of, uh, reporting.


[User] Please transcribe this text

[Assistant] Now you might ask me, hey, if I take screenshot or video for each and every test, then definitely the reporter size will be huge, right? Of course it will be huge because we are taking the videos.


[User] Please transcribe this text

[Assistant] If I want to retry the test, then I can go with that. Okay. So for example, like retain on failure in the sense like if there is any failure in that case only it will take the screenshot.


[User] Please transcribe this text

[Assistant] I mean screenshot as well as video. Okay. So here we can configure like for only one failure. Okay. Now let me run and show you.


[User] Please transcribe this text

[Assistant] Uh, before that, I'm going to fill the script explicitly so that we can see that. Okay. So here, uh, let's say that, uh, somewhere in this to have URL, right? So here I'm going to.


[User] Please transcribe this text

[Assistant] Okay, so instead of logout, I will just make it like login. So our test script will fail. If there is any failure, then we'll get the screenshot as well as the video. Okay, so I'm going to bring up this terminal.


[User] Please transcribe this text

[Assistant] And for each and every execution, we are saying like npx playwright test, npx playwright test. We can make that very simple. Uh, we can go to our package.json file and within the script, right? So within the script, I can say like, uh, I want to name it like test and then I can say like npx playwright


[User] Please transcribe this text

[Assistant] Then followed by test. Okay. Now I can simply say like NPM run test or NPM test that will basically execute my test. I don't have to say like NPX playwright test each and every time. Okay. Eventually it will call that command internal. That's a very simple.


[User] Please transcribe this text

[Assistant] So here we can see like how the test script is going to run and at the last step, it's going to fail and the failure screenshot and the video we can see.


[User] Please transcribe this text

[Assistant] Okay, so here you can see that, uh, see that the URL is logout, but in our case we have given like login, so it's going to fail. Okay. Now if I go to my reporter folder and if I open this.


[User] Please transcribe this text

[Assistant] You can see like we got the red here and if I go to my console, uh, here also you can see like we are going to get a red dot here, right? Uh, I mean the F, okay. F in, in red in the sense like it's a fail. Okay. If it's going to be a pass, it will give us a green dot. Okay. So that is what this, uh,


[User] Please transcribe this text

[Assistant] So here is a failure. Of course it's a failure and here is the failure step you can see. And here is our screenshot. That's the failure one. And here is the video.


[User] Please transcribe this text

[Assistant] If this is going to pass, we won't get the screenshot or the video because that is what we have configured in our config file. So based on your requirement, you can do that.


[User] Please transcribe this text

[Assistant] And also we have one more option like retry. Okay. So here I can say like, uh, not here. We have to give this within this. Okay. So retries in the sense like you can say like number of times you want to retry. Okay. So for example, if you give like one or two.


[User] Please transcribe this text

[Assistant] So if there is any failure, so if I'm also on this, you can see, you can read the documentation. If there is any failure, it will try to, uh, execute the same test again and again based on the number you are going to mention. Okay. So here I'm going to run and show you that one.


[User] Please transcribe this text

[Assistant] Of course, here it's like, uh, the expect error. So of course we have done it intentionally. Even though we retry, of course there is, there's no.


[User] Please transcribe this text

[Assistant] Actually it's not going to pass. Anyway, it's going to fail, but consider a scenario where like data is not loaded properly or the page is not loaded properly. And when we do the retry, it might get passed, right? In that scenario, this retry is going to really help us.


[User] Please transcribe this text

[Assistant] It's similar to your test ng retry, but there we have to write a lot of code here. It's just a configuration file. That is the best part of play that I can say again. So here you can select the first one got a failure. So second time it's again running.


[User] Please transcribe this text

[Assistant] Okay, so here, uh, we got like two failures.


[User] Please transcribe this text

[Assistant] Um, of course we have retried and the retry is also failed. That is expected, right? So that's okay anyways. Okay. So here you can see the report. The run is the first one, which is our actual script and retry is basically trying to rerun again.


[User] Please transcribe this text

[Assistant] So we have number of two retries, so it's giving like retry one, retry two. Okay. So that is how the reporter is going to look like and it's really, really.


[User] Please transcribe this text

[Assistant] Okay, so we will get the screenshot, we will get the video, but we don't have to do anything, just a configuration part. Okay, so that's the beauty of playwright and I hope you are enjoying this playwright as of now. Okay.


[User] Please transcribe this text

[Assistant] So lastly we are going to learn the auto weight mechanism, but, uh, I'm not going to give you the demo, rather I'm going to, uh, give you the documentation because it's really huge. I cannot give you demo for each and every actions, but I will try to bring some, uh, useful, uh,


[User] Please transcribe this text

[Assistant] Context maybe in future video. Okay. So here this is the auto wait link.


[User] Please transcribe this text

[Assistant] I mean official documentation of from playwright. I will leave the link in the description. Kindly check that. And also all the source code you can find in my GitHub repository. So just go to github.com slash or Tony Casey. And if you go to the repository here, we have like a playwright TS lambda test. I will leave this link in the rep in the description as well. You can check it out from there.


[User] Please transcribe this text

[Assistant] So here you can see like before each and every actions, let's say that it's going to do the check or click or double click or, uh, some, another options like actions.


[User] Please transcribe this text

[Assistant] Then it's going to attach, it will check like whether the element is attached to the DOM, if it's visible, if it's stable, if it's receiving any events and then if it's enabled. Based on this many conditions, playwright actions will be done. Okay, so here you can see the kind of like chart where they have mentioned like


[User] Please transcribe this text

[Assistant] If you're going to do the click action, definitely it will wait until the element is attached, visible, stable. All the events are completed if it's enabled. Okay.


[User] Please transcribe this text

[Assistant] And fill in the sense like kind of same case, right? So if it's editable, we'll wait until that particular text box become editable.


[User] Please transcribe this text

[Assistant] Okay, so that is how the playwright works and it's really really very easy.


[User] Please transcribe this text

[Assistant] If you know a little bit of JavaScript and TypeScript, it's going to be very, very easy. Okay. So that's it from my side. If you have any queries, feel free to ask me in the comments. Uhm, I'll see in the next one very soon. Tata bye bye. Take care.


[User] Please transcribe this text

[Assistant] Mother's not over Fonda, young women. I hope she's properly grateful.


[User] Please transcribe this text

[Assistant] It's my father taught me all my trade. I often think of him working here.


[User] Please transcribe this text

[Assistant] May I ask who is your commanding officer? Because I am suspicious that you're stealing good valor.


[User] Please transcribe this text

[Assistant] I feel bad about it, but not apocalyptically bad about it because you'll still have one less chaotic round to sort some stuff out after this, but this is a very important round.


[User] Please transcribe this text

[Assistant] Okay, I think I like this. I have ideas in my head.


[User] Please transcribe this text

[Assistant] Okay, like, I'm trying to do the fucking big brain math here, because Clayton, you were on the mission that failed with me, right? I wasn't on any missions this time.


[User] Please transcribe this text

[Assistant] I feel like it is a good idea to do an entirely new team at this point.


[User] Please transcribe this text

[Assistant] You always need to look out for- for duckers, though. Like...


[User] Please transcribe this text

[Assistant] Yeah, yeah, before you say it out loud, Josh, you're Merlin, right? Yes. Yeah, there we go.


[User] Please transcribe this text

[Assistant] Can you identify these clothes as those in which you yourself dressed the child?


[User] Please transcribe this text

[Assistant] Have a vision for yourself and a vision for your life.


[User] Please transcribe this text

[Assistant] The key to having a vision is to have a dream. They say in the song, you've got to have a dream if you want to make a dream come true.


[User] Please transcribe this text

[Assistant] And you can fulfill your dreams. All the great movers and shakers throughout all of history have been dreamers. They've been people with dreams. They've been people with visions. All leaders have vision. In the Book of Solomon, it says, where there is no vision, the people perish.


[User] Please transcribe this text

[Assistant] And the metaphysical meaning of that is that where people lack vision, they perish inside.


[User] Please transcribe this text

[Assistant] If the best way to predict the future is to create it.


[User] Please transcribe this text

[Assistant] Which means to have a vision, and even though the vision is in the air or the sky, then build a foundation under your dreams. And when you see men and women who rise from poverty and obscurity to fame and renown, you invariably see someone who had a vision of what they could be and have a do that was far beyond


[User] Please transcribe this text

[Assistant] What they were. Every one of us has had an experience. At one time when we were small, we had a vision of being grown up and having our own cars. And as we grew older, we had a vision of having our own homes and our own families.


[User] Please transcribe this text

[Assistant] As we grew older, we had a vision of traveling and going to Europe. We fulfill all our visions. The wonderful thing is this, is that we always tend to achieve our goals. The problem is that our goals are set so low that even when we do achieve them,


[User] Please transcribe this text

[Assistant] They don't turn us on. They don't fill us with enthusiasm. So dream big dreams, if you like, and focus on results.


[User] Please transcribe this text

[Assistant] Not activities. This is the key. Be clear about the results that you're trying to accomplish. This is one of the keys of peak performance. By the way, all peak performers are result oriented. All losers or underachievers tend to be activity oriented. And in activity orientation, what they do is they work very, very hard. Sometimes they work frantically. Sometimes they work longer hours than you do, but they lose sight.


[User] Please transcribe this text

[Assistant] Of the result, Ben Trego, the strategic thinker said, very worst thing in the world is to do very efficiently what need not be done at all.


[User] Please transcribe this text

[Assistant] And many of us, and many of us work very, very hard to do very efficiently what need not be done at all. And anybody who's ever had employees will tell you that every single day you come across your employees doing something very diligently, but it's completely irrelevant to the success of the business.


[User] Please transcribe this text

[Assistant] So focus on results. Here's a key question to ask yourself in your working life. I think it's one of the most important key questions. I'll give you two. Number one is, what results are expected of me?


[User] Please transcribe this text

[Assistant] What results are expected of me? Not what activities, but what results or what outputs, what am I supposed to produce in my job? A second question you can ask yourself is why am I on the payroll? Why am I on the payroll?


[User] Please transcribe this text

[Assistant] And one of the keys to success is to be very straight, and to be very clear, be very precise. Interesting, one of the reasons why people do not speak to the point is for fear of offending others. Not true?


[User] Please transcribe this text

[Assistant] Interesting study they did last year. They asked a great number of executives, male and female. They said if you had to tell a person something unfortunate with regard to their career that was going to affect their lives, and this is something that you've known for a long time, how would you go about breaking the news to them?


[User] Please transcribe this text

[Assistant] And each of the person described the strategy they would take. They would set up the timing right. They would start off with a talk about, uh, talking about subjects that they had in common. They would close the door and keep out the noise. Anyways, they went around and around and they're all circuitous routes of how they would get to the point.


[User] Please transcribe this text

[Assistant] And then they reversed the question. They said, how would you like to be informed of this same subject? And every single one of them said, I'd like to be informed in a straightforward way. I'd like somebody to tell me straight the news.


[User] Please transcribe this text

[Assistant] You see, all of us want to be dealt with in a straightforward way because we know we can take whatever it is. But we think that everybody else is too fragile. So what we do is we pussyfoot and tippy toe around


[User] Please transcribe this text

[Assistant] And avoid giving them the news. And we finally do get the news to them. Sometimes causes more problems than is necessary. So be straightforward. Be clear in your language. Be clear in your actions. Let people know exactly where you stand. And let people know exactly what you've said and what you mean. Very, very important. And this takes practice, by the way. Uh, every single one of these habit patterns, every single one of these qualities has to be learned by practice.


[User] Please transcribe this text

[Assistant] You see, you don't have to be a quantum leap different from somebody else. You just have to be a little tiny bit different in the critical areas that make a difference. And you can achieve that simply by making it a goal, setting it as a goal, and working on it. You can become anything that you want to become. The harder you work, the better you get. The harder you work, the better you get.


[User] Please transcribe this text

[Assistant] In our society it is a lot of controversy over why should I work so hard for my job. The fact of the matter is that less than 5% really succeed, that's less than 5% of the population really succeed at life. Of 100 people working today, only one will be wealthy when they retire. Four will be financially independent, 15 will have some savings, 80% will be broke and dependent upon charities and pensions.


[User] Please transcribe this text

[Assistant] Only one or two percent of people in each generation really makes it in life. And in every single study, those people who make it are those who work hard, hard.


[User] Please transcribe this text

[Assistant] Hard. And if you think that it's hard to be successful, try being a failure. Try coming to the end of the trail with no money dependent upon pensions and you don't know what hard is until you try living like that. But if you work hard, the average self-made millionaire in America works 12.


[User] Please transcribe this text

[Assistant] To 13 hours a day, works about 60 to 65 hours a week. I'll tell you this with regard to hard work, that in our society you only work 8 hours a day.


[User] Please transcribe this text

[Assistant] For survival. Everything over eight hours is for success. And if you're only working eight hours a day, you're in trouble.


[User] Please transcribe this text

[Assistant] If you're only working eight hours a day, you better have a rich uncle or you better have somebody else who's going to take care of you because eight hours a day only gets you survival in our society because it's so competitive that somebody else is working nine. They've got an edge on you. Somebody else is working 10. They've got a bigger edge on you. Every hour over eight that you invest is an investment in your future, is an investment in your success. And if you put in the hours over eight,


[User] Please transcribe this text

[Assistant] And I talk to men and women all over America who are unhappy and they're sad and they don't like their work and you know why? It's because they're not good at what they're doing. Well, let me give you a couple of key points.


[User] Please transcribe this text

[Assistant] Is first of all, you'll never have a feeling of self-esteem and self-worth. You'll never feel wonderful about yourself until you know that you are good at what you're doing.


[User] Please transcribe this text

[Assistant] Number two is if you do not love your work enough to want to be the best at it, get out of it the way you would get out of a burning house.


[User] Please transcribe this text

[Assistant] Do not stay at a job that you do not love because it is the high road to failure, dissatisfaction, frustration, and unhappiness in life. Listen to your intuition.


[User] Please transcribe this text

[Assistant] Your intuition is one of the best guides that you possibly have. You know from some of the other work that we've done is that each person has inside them an intuitive sense which will always give you the exact right answer for you. They've done some studies between men and women when they test women's intuition. You've heard of women's intuition? Everybody's heard of women's intuition?


[User] Please transcribe this text

[Assistant] They find that when you give men and women tests, and they're asked to answer on the basis of their intuition, men's intuition is equally as accurate as women's intuition. The only difference is that in real life, women have the intelligence to listen to their intuition, which is why they're smarter than men.


[User] Please transcribe this text

[Assistant] And women and men do not listen to their intuition, instead they override their intuition because they're trying to get something they want the fastest and easiest way, even if their gut feeling says don't do it.


[User] Please transcribe this text

[Assistant] Has anybody here ever gone against their intuition and had it work out?


[User] Please transcribe this text

[Assistant] No. Your intuition will always give you the most accurate answer for you. It's almost like an inbuilt computer that will take all of your life experience and knowledge and everything going on around you and give you exactly the right answer. So listen to your intuition.


[User] Please transcribe this text

[Assistant] Learn from your setbacks. This is one of the characteristics of high performing men and women is that every single time they have a problem or a difficulty they sit back and they dissect it and they learn everything possible from it. They try to develop general principles.


[User] Please transcribe this text

[Assistant] From each setback, they say, what is the valuable lesson I can learn? So you take a look at everything that has happened to you, take a look at the very most difficult experience that you're in right now, and ask yourself, what is the most valuable lesson I can learn from this experience? And believe me, if you look for the lesson, in the Bible it says, seek and ye shall find. It doesn't say seek and occasionally you might find something.


[User] Please transcribe this text

[Assistant] The unexamined life is not worth living.


[User] Please transcribe this text

[Assistant] Which means that the life where you do not take the time to reflect on your experiences. Aristotle said that wisdom is an equal measure of experience plus reflection.


[User] Please transcribe this text

[Assistant] And the reason so few people have wisdom is what they have is experience, experience, experience, but they never take the time to sit back and reflect on what's happening to them, reflect on what they're learning.


[User] Please transcribe this text

[Assistant] How many people here have seen people get out of bad relationships and get immediately back into bad relationships? Or get out of a lousy job and immediately join a company and get into another lousy job?


[User] Please transcribe this text

[Assistant] What is the natural thing that people do? They, they get fired or laid off from a job, they quit, they go down the street, they look for what?


[User] Please transcribe this text

[Assistant] I know, I know that job exactly just like, exactly like it.


[User] Please transcribe this text

[Assistant] I found that the ability or the willingness to make a complete commitment to a job, a commitment to a relationship, a commitment to a profession, to make a commitment is one of the hardest things that human beings do. That very few people make commitments. That most people in this room, I hate to say it, most people in this room are not totally committed to their work.


[User] Please transcribe this text

[Assistant] Oh yeaah, they're doing it, they're in it, they're doing a reasonably good job, nobody spired them yet, right?


[User] Please transcribe this text

[Assistant] But they're not committed, their whole heart isn't into it. And yet no success is possible without commitment.


[User] Please transcribe this text

[Assistant] Who is it that Emerson said that every great achievement is the triumph of enthusiasm?


[User] Please transcribe this text

[Assistant] That the ability to commit yourself enthusiastically, wholeheartedly, 100% to what you want to do is the starting point of all achievement. That if you cannot commit yourself wholeheartedly, it probably means that it's not right for you.


[User] Please transcribe this text

[Assistant] And that all of us in life seek for something that we can commit ourselves to. Alan Cox in his book, The Achievers, which came out last year, found that the executives in the corporations that he studied who achieved the very most in the shortest period of time had found the proper niche for themselves and had lost themselves in their work.


[User] Please transcribe this text

[Assistant] Dr. Shrully Blotnick's study of self-made millionaires. 83 out of 1500 people became self-made millionaires over 20 years. He found that the one quality that they all had in common was that they picked work that they loved.


[User] Please transcribe this text

[Assistant] They specialized in that work. They became very good in it.


[User] Please transcribe this text

[Assistant] And they eventually began paid very well for it and then they held onto the money. I throw that last one in because I know a lot of you can relate to that. They held onto the money. They didn't gamble or speculate. They were very conservative with their money. They got paid more and more and they held onto it. One of them started off cleaning toilets on the night shift for an airline.


[User] Please transcribe this text

[Assistant] And today he's the president of the airline and makes $1,950,000 a year.


[User] Please transcribe this text

[Assistant] I've been with the airline for 35 years, but it's not easy to be, not difficult to become a millionaire when you're making $1,950,000 a year. Even with taxes, you can still do pretty well.


[User] Please transcribe this text

[Assistant] He found that the quality that separated these people from the ones who struggled for 20 years and weren't much further ahead than when they started


[User] Please transcribe this text

[Assistant] Was that they became totally absorbed in their work. Totally committed to their work. They lost themselves in their work. And when they lifted up their head about the age of 43, 44, their accountant told them, by the way, you're worth over a million dollars now. Did you know that? Most of them became wealthy without even knowing it.


[User] Please transcribe this text

[Assistant] And so it's important that you find the work that you can commit yourself to. It's important that you find the relationship you can commit yourself to. And if you are an employer and you have people working for you who are not committed to their work, these people are like rotten apples in a barrel.


[User] Please transcribe this text

[Assistant] I have found that people who are not committed to their jobs are people who will always cause trouble within an organization.


[User] Please transcribe this text

[Assistant] In life, because of lack of loyalty to their companies, to their boss, and for any other reason.


[User] Please transcribe this text

[Assistant] And why is lack of loyalty? Lack of loyalty is just the expression of lack of commitment to that organization.


[User] Please transcribe this text

[Assistant] Dare to go forward in your life. Dare to go forward in the direction of fulfilling your potential.


[User] Please transcribe this text

[Assistant] Many years ago I was a karate student. I was also a karate instructor. And I competed in three international championships. And one of the things that I learned from my


[User] Please transcribe this text

[Assistant] Best karate instructors and I studied under six world champions, as they told me that when you fight, always move forward. Even if you're only moving forward a half an inch at a time, just always move forward. So when you're moving forward, a hundred percent of your attention is forward. But if you're moving backward, even a half an inch at a time, half of your attention is always behind you and where you're going.


[User] Please transcribe this text

[Assistant] So always move forward. Always have a, dare to go forward. Whenever you have a choice of either staying still and playing it safe or moving forward, move forward. Not because you'll necessarily succeed every time because it reinforces and cements the habit of moving forward.


[User] Please transcribe this text

[Assistant] And most people when they have a choice of moving forward or staying, playing it safe, play it safe.


[User] Please transcribe this text

[Assistant] But I think General MacArthur, General Douglas MacArthur said there's no security in life.


[User] Please transcribe this text

[Assistant] Only opportunity. Life is very perverse in a way because the more we seek security, the less we have it. And the more we seek opportunity, the more we have security.


[User] Please transcribe this text

[Assistant] Ellen Keller said this beautifully. She said, life is either a daring adventure or nothing at all.


[User] Please transcribe this text

[Assistant] That the tendency, she said in the earlier parts of this statement, she said the tendency to seek security is the low road to failure.


[User] Please transcribe this text

[Assistant] Is absolutely essential. And one of the things that I, I used to think that if you were really courageous, eventually you got to the point where you weren't afraid. I'm going to tell you something, that if you're not a little bit afraid, at least three or four nights a week, you're not trying hard enough.


[User] Please transcribe this text

[Assistant] If you're not falling your face over and over again, if you're not trembling when you go to sleep with your heart pounding, then what is happening is you're not trying hard enough. You're living too far within your potential, that all really successful people live on the outside edge of what they're capable of.


[User] Please transcribe this text

[Assistant] And it's always a little bit scary on the outside edge because we all have feelings of uncertainty. We all have fears. We all have doubts that hold us back.


[User] Please transcribe this text

[Assistant] That do not fulfill their potential. See, the wonderful thing is only a few percentage of people fulfill their potential in any generation. And we can join those people simply by deciding to do so and doing what the other people do. As simple as that. If we decide to become an engineer, what do you study? You study engineering. If you want to become a better cook, what do you do?


[User] Please transcribe this text

[Assistant] You study cooking. Do you try to do it all by yourself? No, you get cookbooks, you take classes and so on and so forth. If you want to be successful, if you want to fulfill your potential, study the men and women who are fulfilling their potential and just do what they do.


[User] Please transcribe this text

[Assistant] And finally, with regard to courage, the great expression of courage is to persist in the face of adversity.


[User] Please transcribe this text

[Assistant] To persist when things really get rough. To be able to pick yourself up and pick yourself up over and over again. And believe me, if you decide to go for the goal in your life, you're going to get knocked down over and over and over and over again. Every single week, you're going to have heartaches and disappointments and frustrations and setbacks and obstacles. But without those obstacles, no success is possible.


[User] Please transcribe this text

[Assistant] You see, the only way we can be successful is if we develop momentum. And we cannot develop the momentum unless we are struggling with obstacles. And struggle with adversity goes hand in hand with all great success.


[User] Please transcribe this text

[Assistant] What most people do is they back away from adversity. But if you want to see if you're a brave person, what they call the four o'clock in the morning courage,


[User] Please transcribe this text

[Assistant] Wait when things go completely to pieces, when things are the worst, when your very best deal falls apart and your rent is late and you're tired and you're sick and everybody is mad at you and your car doesn't work, then it's the person that picks themself up and says nothing is going to stop me.


[User] Please transcribe this text

[Assistant] You know, you know, the best quality in the world that you can develop, and I give it to you because I made it my life's habit to develop this quality. I hope I've got it. I don't know for sure. But the quality is to develop the quality of being unstoppable.


[User] Please transcribe this text

[Assistant] Develop the quality of being unstoppable. Say in yourself that no matter what life throws at me, it'll never stop me. No matter how rough it gets, I will never quit, and nothing will ever stop me. Make the decision that you can be tired, you can be worn out, but nothing


[User] Please transcribe this text

[Assistant] It's ever going to stop you. That's a wonderful decision. Because then no matter what life throws at you, you pick yourself up. And you say, okay, give it, you know, give it your best shot. As Fonzie says, nothing is going to stop you. It's a wonderful feeling. It's a wonderful feeling. It's the basis of self-esteem.


[User] Please transcribe this text

[Assistant] Welcome to The Late Show. I'm your host Stephen Colbert. Happy first day of spring.


[User] Please transcribe this text

[Assistant] Now, uh, if you're in the northeast, it may not feel like spring, since it's still pretty chilly today. Though just a few weeks ago, it was in the 60s. God, I wish it was winter again so I could wear shorts.


[User] Please transcribe this text

[Assistant] Today's, you can't tell, you can't tell what everything's gonna be. Of course, uh, last week, uh, President Trump released his first budget. They're calling it a hard power budget because it features a $54 billion increase in military spending. And to pay for the new spending,


[User] Please transcribe this text

[Assistant] Can you tell me how to get, how to get to Sesame Street? You can't, it's gone.


[User] Please transcribe this text

[Assistant] This program provides elderly shut-ins just minimal nutrition and a scrap of human dignity. What kind of heartless monster would be against that? Did someone say fiscal conservative? Oh! Hey!


[User] Please transcribe this text

[Assistant] Say hello to my conservative pundit colleague, Stephen Colbert. Hey, Stephen, how are ya? Hello, nation. Stay strong. Be brave. Now, just to be clear, Stephen, you are not the character I used to play for my old show, are you? Because I really wouldn't want to- That cuck. I could not be more different. Here's the difference.


[User] Please transcribe this text

[Assistant] His favorite sandwich is a BLT. Okay? I like a TLB. B stands for balls. Delicious. Put it in your mouth.


[User] Please transcribe this text

[Assistant] You're hunting humans? No, bears! Have you forgotten so soon? They are godless killing machines. Alright? Besides, humans are out of season.


[User] Please transcribe this text

[Assistant] No Stephen, I'm here because America needs me. Plus, I wanted to stop you from making an ass of yourself on network TV with your misguided analysis of Trump's budget. Oh, you think you can do better?


[User] Please transcribe this text

[Assistant] Do better? My middle name is Do.


[User] Please transcribe this text

[Assistant] Okay, well then, I guess the stage is yours. Ladies and gentlemen, Stephen Colbert.


[User] Please transcribe this text

[Assistant] Thank you, nation. You know, folks, Trump's budget is getting heat because it's supposedly cruel to old people for no reason. When in fact, they've got a very good reason. And that brings us to tonight's word.


[User] Please transcribe this text

[Assistant] Now, you heard the guy who normally sits here moanin' about these cuts to meals on wheels, but that guy, he's a well-known grandma hugger.


[User] Please transcribe this text

[Assistant] People are saying that this budget lacks compassion. But White House Budget Director and 49-year-old temp Mick Mulvaney knows that it's just the opposite.


[User] Please transcribe this text

[Assistant] Yes, you can't just focus on helping the needy and forget the people whose taxes pay for it. That's like praying for the accident victim who needed a transfusion and forgetting about the guy who's walking around a pint light now. Give that guy a cookie. Now Mulvaney.


[User] Please transcribe this text

[Assistant] Had to cut Meals on Wheels because they failed to meet their objectives. Yes, it's called Meals on Wheels, but how often do you see a hamburger driving down the highway? Now, now folks, I know what you're saying.


[User] Please transcribe this text

[Assistant] You're saying, they did meet their objective, Stephen. They brought food to the elderly. Well, technically yes, Greg. And we all know what happens to food after we eat it. We are literally throwing money down the toilet. And...


[User] Please transcribe this text

[Assistant] Think about this, Mulvaney said the primary goal of Trump's budget is not driving Cheetos to grandpa after he gets the munchies from his glaucoma pot. Okay? It's defending America. And...


[User] Please transcribe this text

[Assistant] A lot of people say that Mulvaney is being cruel to old people. That's not fair. He's also being cruel to young people. Because here's the deal, this budget,


[User] Please transcribe this text

[Assistant] This budget also cuts after school lunch programs for poor kids. But again, for a very good reason.


[User] Please transcribe this text

[Assistant] Mulvaney's not doing this to be mean. He's looking out for taxpayers.


[User] Please transcribe this text

[Assistant] Good point, Mick. I for one wouldn't wanna be the fella who has to tell a single mom of two in Detroit, I'm sorry ma'am, but I'm afraid we're gonna feed your children.


[User] Please transcribe this text

[Assistant] The only thing that worries me is that this isn't actually a budget. You see, this is just the president's wish list. And Mick Mulvaney is just Trump's magical monkey paw. Congress.


[User] Please transcribe this text

[Assistant] Congress are the only ones who can make a budget. So my real worry here is that a lot of people might go to house.gov and find out how to call their congressman and tell them to protect kids and old people. And that could derail. Because if they did that,


[User] Please transcribe this text

[Assistant] I don't know nothing about it. You will talk if they get stopped.


[User] Please transcribe this text

[Assistant] I'm absolutely against the motion. I must ask to be excused from voting on this matter. My older brother was one of the hostages executed this morning.


[User] Please transcribe this text

[Assistant] I'll see. Yes, that's right.


[User] Please transcribe this text

[Assistant] You know what, Nate? Stop it. You're under arrest.


[User] Please transcribe this text

[Assistant] You still have his life in your hands. Who was the man you helped escape when you sent our man the wrong way?


[User] Please transcribe this text

[Assistant] The same gentleman who visited your fiancé that other night. Under the name of Carl Vanier.


[User] Please transcribe this text

[Assistant] Looks like both of us had a solution to that. Huh?


[User] Please transcribe this text

[Assistant] Fellow Patriots, the time has come. Fellow Patriots, there's work to be done. Raise the invisible torch and pass it along. Keep it burning. Keep it burning forward on the road that has no turning.


[User] Please transcribe this text

[Assistant] Die if you must for a cause that's just, but shout to the end, no surrender, ever onward.


[User] Please transcribe this text

[Assistant] No returning till the senseless butcher will be learning that his war isn't won till the last battle's done. Carry on when we are gone. No surrender.


[User] Please transcribe this text

[Assistant] Sitting next to Dora was a young lady I had not noticed before. Although she was only about twenty, she looked very calm and wise.


[User] Please transcribe this text

[Assistant] I later discovered that she had an unhappy experience in love.


[User] Please transcribe this text

[Assistant] And had decided never again to become personally involved in matters of the heart. How delightful for you, I answered, blushing as I always did when I spoke to Dora. And everything that is delightful to you is delightful to me, Miss Spenlo. Miss Mills said nothing, but smiled kindly on us both. To get to the picnic place, which was some way from the house,


[User] Please transcribe this text

[Assistant] Mr. Spenlow, Dora, and Miss Mills drove in an open carriage.


[User] Please transcribe this text

[Assistant] While I rode by their side on my handsome white horse. I shall never have such a ride again.


[User] Please transcribe this text

[Assistant] Dora sat with her back to the horses, looking towards me, and holding my flowers close to her sweet face. Our eyes often met, and I'm surprised I did not fall off my horse. I did not notice the dust, or the road we were taking. Sometimes Mr. Spenlow spoke to me about the scenery, and I replied politely, but I cannot remember what I said. All I could see was Dora.


[User] Please transcribe this text

[Assistant] The dude pulling the trailer stepped on the brakes, right? Now he's slowing down at a constant rate, okay? A constant acceleration. Okay, so, uh, let's see. That's it. Calculator!


[User] Please transcribe this text

[Assistant] The FBI, as part of our counterintelligence mission, is investigating


[User] Please transcribe this text

[Assistant] As you know, our practice is not to confirm the existence of ongoing investigations.


[User] Please transcribe this text

[Assistant] The past instances where the Department of Justice and the FBI have spoken about the details of some investigations.


[User] Please transcribe this text

[Assistant] We've offered no opinion, have no view, have no information on potential impact because it's never something that we looked at.


[User] Please transcribe this text

[Assistant] The colour was beginning to return to Agnes's face. So it, it wasn't my father's fault, dear Miss Trotwood. Not at all, Agnes, said my aunt cheerfully. Now, can any of you give me some advice?


[User] Please transcribe this text

[Assistant] I've asked my servant Janet to rent my little house in Kent. That will bring in about seventy pounds a year. I think we'll need more than that to live on. You and David could share this flat very cheaply, with Mr. Dick just round the corner in his rented room, suggested Agnes. And I think I can find a little job for David. Do you remember Dr. Strong, the headmaster of the Canterbury School?


[User] Please transcribe this text

[Assistant] He needs a private secretary to work for him in the mornings and evenings at his house. He was asking father about it the other day. What do you think? Agnes, I cried. What would we do without you? You are my good angel. I told you so before. I could easily be Dr. Strong's secretary.


[User] Please transcribe this text

[Assistant] As well as continuing my work in Mr. Spenlowe's firm, I'll go and see him today and arrange it with him.


[User] Please transcribe this text

[Assistant] Agnes gave me her beautiful smile as she got up to leave. I went downstairs with her, and as we walked together to the coach station


[User] Please transcribe this text

[Assistant] I saw an old beggar with a white stick in the street.


[User] Please transcribe this text

[Assistant] He was holding out his thin hand for money, and crying, blind, blind, blind.


[User] Please transcribe this text

[Assistant] It sounded like an echo of what my aunt had said the day before. Oh, Agnes, dear sister, if I had only known then what I discovered long afterwards.


[User] Please transcribe this text

[Assistant] If I ever go back, I certainly will. What do you mean?


[User] Please transcribe this text

[Assistant] Good heavens, what are we talking about my father for? Your new play opens on Saturday. Wish you be drinking to its success. Its success? My dear boy, you don't doubt it'll be a success?


[User] Please transcribe this text

[Assistant] I think perhaps it is our best lead towards finding this ring, Myriel.


[User] Please transcribe this text

[Assistant] Terrible happened here. But the wizard wore the crescent moon ring. Unless...


[User] Please transcribe this text

[Assistant] You just told me where you worked and I found it in the dial-by-name directory.


[User] Please transcribe this text

[Assistant] Okay, yeaah, I'll figure something out, but uhm, why don't I pick you up at like 730 and I'll figure something out in that half hour window.


[User] Please transcribe this text

[Assistant] These artistic chaps are all the same, but have long haired degenerates.


[User] Please transcribe this text

[Assistant] That being said, though, I-I get why a president firing the special prosecutor investigating his campaign is something the media would want to cover, because it's fun to gossip. Which, if we're honest, is at this point, all this story really is.


[User] Please transcribe this text

[Assistant] So some guy is just guessing that Trump is thinking of firing Mueller.


[User] Please transcribe this text

[Assistant] Maybe him? No. Look, I-I know it's exciting to think about Trump sabotaging his presidency, but this is a rumor. No more, no less. Like, why waste energy on speculative crazy when there's so much actual crazy to focus on?


[User] Please transcribe this text

[Assistant] Yes, finally, Republicans stepping up for the white working-class banks. Ah.


[User] Please transcribe this text

[Assistant] And look, I know that relaxing bank regulations could easily lead to another financial collapse.


[User] Please transcribe this text

[Assistant] But is that necessarily a bad thing, is it, huh? Because, I mean, let's be honest, every generation deserves the chance to complain to their kids about how rough they had it, huh?


[User] Please transcribe this text

[Assistant] But there's way more coverage on the Mueller story, because it's more fun to watch a soap opera than CNBC. It's the same reason today everyone was glued to the latest installment of the DC Hobbit, the Senate testimony of Attorney General Jeff Sessions.


[User] Please transcribe this text

[Assistant] Jeff Sessions today gave sworn testimony about the Russia investigation to the Senate Intelligence Committee.


[User] Please transcribe this text

[Assistant] And it was a pretty dramatic hearing, because just last week, James Comey testified to the same folks, and he threw some hard shade at his former boss, suggesting that Sessions hasn't been truthful about his role in the whole Russia mess. And today, Sessions fought back.


[User] Please transcribe this text

[Assistant] Now, the recusal that Sessions mentioned was one of the key issues everyone wanted to know about. Did he speak to President Trump about Russia after he said he wouldn't? So the question was simple.


[User] Please transcribe this text

[Assistant] Hey, everyone. Before you click over to another YouTube contouring tutorial, uh, just a reminder, watch full episodes of The Daily Show for free anytime with the Comedy Central app or at thedailyshow.com. Now you can go on your way. Remember, it's all about the cheeks, the lines, and the cheeks.


[User] Please transcribe this text

[Assistant] Your charges, Marion and Laura, have naturally retired. And your employer, Mr Fairlie, is a man of idiosyncratic nature. He keeps to his own apartments. To be frank...


[User] Please transcribe this text

[Assistant] That either we resist their demand or at the very least, before we sign, make Laura and Marion acquainted with it.


[User] Please transcribe this text

[Assistant] His lawyers have no right to demand these clauses, and it seems to me is that they're anxious to settle before she comes of age. If you stand firm, they must give way.


[User] Please transcribe this text

[Assistant] And I will communicate all you have said to Laura's uncle and guardian. I imagine that ends the matter.


[User] Please transcribe this text

[Assistant] And provided both of you accept that you were completely duped by this young man, I suggest we let the matter rest.


[User] Please transcribe this text

[Assistant] Break open the door to get help to you, but the doctors say you are stronger now, and I have to ask you to be brave, Marion.


[User] Please transcribe this text

[Assistant] Please, Marion. You are still not strong.


[User] Please transcribe this text

[Assistant] Glyde would have the perfect right to take legal action against you. Please.


[User] Please transcribe this text

[Assistant] Wild accusations which may well prompt legal action.


[User] Please transcribe this text

[Assistant] Your uncle is severely angry and disturbed and will now not have you back at Limeridge.


[User] Please transcribe this text

[Assistant] I am sorry Marion, but I must have your undertaking. The alternative is destitution.


[User] Please transcribe this text

[Assistant] Oh, Mrs. Hardcastle. Just hold on a moment. Mrs. Hardcastle on the line, sir.


[User] Please transcribe this text

[Assistant] So uhm, I remember, uhm, in the two realizations paper, there's some, for me, rather mysterious comment about, uhm, you first get this function from perf and then you get a map in the other direction via, and this is analogous to things in functional analysis.


[User] Please transcribe this text

[Assistant] What's the analogy here? Uhm, so here we have this bunker from Perth.


[User] Please transcribe this text

[Assistant] A very, like, just very naive question. Like, if I just look at the inclusion of perf into co, uhm, what's that for example? Does that have a co-kernel on k-theory for example? And does one understand what the, what the co-kernel is?


[User] Please transcribe this text

[Assistant] Hello everyone and welcome to another episode of Overboard. Today we're playing Herdmentality and we are joined by our special guest, Joshua Rivera of Polygon.


[User] Please transcribe this text

[Assistant] He's an entertainment reporter here with us. Uh, hello, Joshua.


[User] Please transcribe this text

[Assistant] I am keeping track of scores, so I have given a point to myself, Jenna, Josh, and Pat for all being in the consensus answer. Joining the herd.


[User] Please transcribe this text

[Assistant] Ooh, I'm displaying my pink cow. I shouldn't be doing that yet. I don't have it. No one does. Next question. What is the worst day of the working week?


[User] Please transcribe this text

[Assistant] Clayton, what have you done? The next name of famous robot.


[User] Please transcribe this text

[Assistant] You see? Because we had two twos and then two odd ones out.


[User] Please transcribe this text

[Assistant] Nothing changes. There's no score, there's no new pink cow.


[User] Please transcribe this text

[Assistant] I will, name the biggest fruit you can fit in your mouth without chopping it up. You're right, it doesn't say swallow.


[User] Please transcribe this text

[Assistant] Three, two, one. Reveal. Plum.


[User] Please transcribe this text

[Assistant] Congratulations, Joshua! You've gotten two, you're at two. So points right now are standing at Josh, Joshua, and Simone at two points, Clayton, Jenna, and Pat at four points.


[User] Please transcribe this text

[Assistant] Okay, okay. Alright. And our next question. Who is the best Muppet?


[User] Please transcribe this text

[Assistant] Alright, next question. What is the best way to cook an egg?


[User] Please transcribe this text

[Assistant] I, this is a passionate answer. 3, 2, 1.


[User] Please transcribe this text

[Assistant] Name a famous John. Do we hedge our bets? Depends what you mean by that.


[User] Please transcribe this text

[Assistant] Fuck, fuck. We got beef. We got beef. Alright.


[User] Please transcribe this text

[Assistant] Alright. Oh my god. Next question.


[User] Please transcribe this text

[Assistant] This is a bit like, this is a bit like, do you take invisibility or flying? It's gonna say a lot about you.


[User] Please transcribe this text

[Assistant] Everyone but me gets a point. Uh, next question. And importantly, will it be ending this game if either Jenna or Pat alone receives a point? Okay.


[User] Please transcribe this text

[Assistant] Alright, so we have another question.


[User] Please transcribe this text

[Assistant] Oh no, Josh. Yeah, I know. Oh no!


[User] Please transcribe this text

[Assistant] We have three for PE, which does indeed bring Jenna up to eight points.


[User] Please transcribe this text

[Assistant] I only think history would be easy because it's a thing you can pick out.


[User] Please transcribe this text

[Assistant] You can pick out the most lurid things.


[User] Please transcribe this text

[Assistant] Good job, Jenna, being the most consensus.


[User] Please transcribe this text

[Assistant] Winner. Winner. Nice. So this has been Overboard, and this has been Herdmentality, a game you can obviously play this way, but is also available as a box. Joshua, thank you for joining us.


[User] Please transcribe this text

[Assistant] Alright, we'll do one more question to head out. Uhm, oh great. Who is the best character in Friends?


[User] Please transcribe this text

[Assistant] So the question is like what is Page Object Model? Page Object Model, also known as POM, is a design pattern in test automation that creates an object repository for storing all the elements.


[User] Please transcribe this text

[Assistant] In page object model, consider each web page of an application as a class file. For example, let me give you some demos.


[User] Please transcribe this text

[Assistant] So this is our e-commerce playground from Lambda test platform. We are going to use this for our learning today. So here you can see like we have login page, we have this registration page.


[User] Please transcribe this text

[Assistant] Um, so first of all, we have to do the registration and when we do the registration, we can see like we have few fields like first name, last name, email, uh, telephone, your password confirm and few other things, right? So all this elements, uh, we will write within the


[User] Please transcribe this text

[Assistant] Class called register page. Okay. And then once we do the registration, then we


[User] Please transcribe this text

[Assistant] Use the same condition to do the login. So for that we'll write a separate class as login page.


[User] Please transcribe this text

[Assistant] And there we will keep our email, uh, the password and the login button and the password, forgot password. Okay. So similarly, like for each and every page, each and every screen, whatever the web elements we need to do the interaction in our test case depends on our test case.


[User] Please transcribe this text

[Assistant] We are going to write all those in separate separate classes and then we will call that in our test cases. So why we have to write so many case, uh, so many codes, because of course it's going to be time consuming and as well as, as well as like we have to maintain for each and every screen.


[User] Please transcribe this text

[Assistant] So few things like this will be one time effort, but it will definitely help us well if there is any changes in the application. For example, let's say that this


[User] Please transcribe this text

[Assistant] Uh, login page, right? So this user, uh, email ID, the, whatever the ID or locator we are going to use is going to change in the upcoming sprint. Then wherever I have used this particular login, uh, code there in all the places I have to change, right? But.


[User] Please transcribe this text

[Assistant] We know that use a function, right? We can make this login as a function and we can change within the function once and we have


[User] Please transcribe this text

[Assistant] Call the functions like wherever we have called the login functions that it will get changed automatically. So that is the benefit of page object model. I hope you are good with the theory. Now let's go and get started with the coding part.


[User] Please transcribe this text

[Assistant] Already we have created a project and we have learned few of the concept, right? So within the same project, I'm going to create a folder called, uh, pump.


[User] Please transcribe this text

[Assistant] This is our registration page. Okay, so let me create a class for that.


[User] Please transcribe this text

[Assistant] Okay. So one is the register page. Okay. Similarly, we are going to also create for the login page. So I'm going to write that as well.


[User] Please transcribe this text

[Assistant] Uh, not only registration and login, we will write few other classes as well, just to give you a good idea. Like how can we share the data across multiple tests? Okay.


[User] Please transcribe this text

[Assistant] So here we have like lot of fields. I'm going to skip all the validation part, like the header or the label.


[User] Please transcribe this text

[Assistant] Uh, probably you know that I'm, I'm sure like as of now, if you have all watched all my previous video, then definitely you would have know that how to do that certain playwright. Okay. So I'm just going to do some interaction like here we have all the mandatory fields. I'm going to quickly inspect and write the function for that.


[User] Please transcribe this text

[Assistant] Okay, so that will be like your separate test case, but


[User] Please transcribe this text

[Assistant] Uh, separate function, enter last name, that will be your separate function, but all the functions together, we can write a simple function like register and where we'll pass our actual test data. Okay. So let's go and get started now. So first of all, I'm going to inspect this one and here I can select, we have a ID called input dash first name. I'm going to copy that.


[User] Please transcribe this text

[Assistant] And here of course we have to write the classes. So here we'll say like export and default


[User] Please transcribe this text

[Assistant] And then the class name. Okay, so here it's going to be like register page.


[User] Please transcribe this text

[Assistant] Okay. That's it. Very simple. This is how we write the class in a TypeScript. Okay. Export in the sense like, of course we can use this class for getting object. Okay. Now let's go and write like Hunter first name.


[User] Please transcribe this text

[Assistant] And that is going to be of the type string. Okay. This type is not necessary to declare, but of course it's a TypeScript. We'll get some, uh, suggestion while using this function. So it was recommended to use as well.


[User] Please transcribe this text

[Assistant] So here we are going to use the page. Okay, before that, of course, we have to get the constructor here.


[User] Please transcribe this text

[Assistant] And within the constructor, we are going to say like public.


[User] Please transcribe this text

[Assistant] And then we are going to say like page and that's going to be of type page from playwright. Okay. So I'm going to import that. So import.


[User] Please transcribe this text

[Assistant] Page from playwright test. Okay. So that's it. Very simple. Okay.


[User] Please transcribe this text

[Assistant] Now if you do not know about TypeScript much, uh, this is same thing like declaring a constructor and we get the value, right? We get the page value and we say like this dot page. Instead of that, we can just simply use this. This is like your, uh,


[User] Please transcribe this text

[Assistant] In this video, I'm going to stick to the topic that is Page Object Model. Okay. So here,


[User] Please transcribe this text

[Assistant] Uh, first of all, of course we have to find the locator and the locator is going to be her ID, which is this one. Let me copy and paste.


[User] Please transcribe this text

[Assistant] Okay, that's it. We are done with our first one. Similarly, we are going to write for, uh, the last name, email and everything. Okay. Let's do that very quickly.


[User] Please transcribe this text

[Assistant] Let's write this very quickly. So I'm going to copy paste the same function again. And here I'll say like enter.


[User] Please transcribe this text

[Assistant] And here it will be like phone. And of course the phone number data type is going to be string here because we have to pass it as a string, even though the actual data is number, we have to pass it in the string format. So we'll keep this like string as it is.


[User] Please transcribe this text

[Assistant] And the locator value is telephone. Let's copy that place over here. That's it. Okay. And now we'll give our password.


[User] Please transcribe this text

[Assistant] So let me write to another function. So this is going to be your password and another one is going to be confirm password. Okay. So here like enter password.


[User] Please transcribe this text

[Assistant] Now let's go and check the locator. So here we have like name equal to password. I'm going to copy and change. And here we have like confirm password, which is name equal to confirm.


[User] Please transcribe this text

[Assistant] That's it, we are pretty much done and by default it is like your, uh, no. Okay. So maybe just for, just to show you the validation.


[User] Please transcribe this text

[Assistant] I'm going to, uh, take this one. Okay. So subscribe, yes or no. Okay. So by default it is like selected here. You can see like it is checked basically. Right. So here we have ID called input newsletter. No. And we are going to validate dot validate that one. Okay. So here I will write like async.


[User] Please transcribe this text

[Assistant] And then I can say like, subscribe.


[User] Please transcribe this text

[Assistant] Okay, so here you can select a subscribe, maybe something like checked, very meaningful. And then here I'm going to say like, wait, uh, this dot page dot locator and the locator value.


[User] Please transcribe this text

[Assistant] And is checked. Okay, so we are going to return this, right? So what we'll say, we'll simply say like return.


[User] Please transcribe this text

[Assistant] And this check is going to, of course, return the promise. So here we have to use the await. Okay. How do you set the promises while writing the test? I will show you in a moment. Okay. So that's it. We are pretty much done with our first page. And of course we have to, uh, I think we have to click on this check box as well.


[User] Please transcribe this text

[Assistant] So let's go and see. So, uh, why is this one? Yeah, this is the checkbox. Okay. So let's me go and inspect.


[User] Please transcribe this text

[Assistant] Yeah, I believe we have to check on this input tag only. Uh, let us check if it's correct or not. Okay. So we'll say like,


[User] Please transcribe this text

[Assistant] Okay, so that's going to be this dot page dot click and the value. And of course it should be a bit, okay. Don't miss the bit or else you will see some unexpected behavior in a test script and that will be really tough to debug. Okay. So always make sure you're going to write the proper syntax.


[User] Please transcribe this text

[Assistant] So we're done, pretty much done. I can say, uh, yeah, lastly, we have to click on this continue button and here it's a input which has a valley called continues. I'm going to copy that and here I'll say like,


[User] Please transcribe this text

[Assistant] Click content doesn't make sense to me, so I'll say like continue to register. So that will be more meaningful here.


[User] Please transcribe this text

[Assistant] And I would say like await page, not page, it should be this dot page dot click and the value. Okay. So that's it. Pretty much simple. We are done with our first page. Okay. Now let's go to our login page.


[User] Please transcribe this text

[Assistant] I can copy this one. Yeah. So here, first of all, of course, we have to write a class like export default and then followed by the class name with the keyword called class and then the class name that is login page.


[User] Please transcribe this text

[Assistant] And of course we will have our constructor within the constructor. We will get our, uh, page. So page is nothing but consider if you know Selenium, this is kind of like your driver. Okay. So here I will say like, uh, import the page from.


[User] Please transcribe this text

[Assistant] Okay, that's it, very simple. Now we'll just paste here and here we'll say like enter what is the function name.


[User] Please transcribe this text

[Assistant] Uh, yeah, it's email address, right? So we'll say like enter email.


[User] Please transcribe this text

[Assistant] And this login password has a name called password, so I'm going to copy that.


[User] Please transcribe this text

[Assistant] And this is going to be our password. Even though it is a local variable, we don't have to change particularly for each and every function, but it is recommended to do. So like whenever we call this function, we'll see that in the TypeScript documentation or the VS Code IntelliSense.


[User] Please transcribe this text

[Assistant] So we will be aware of like what exact data we have to pass.


[User] Please transcribe this text

[Assistant] Async, uh, click, and then followed by, what is this, yeaah, login, btn, like login button. And here I'll say like await, the start.


[User] Please transcribe this text

[Assistant] Uh, and then we are going to check the products. Okay, so let me remove this guy from here first.


[User] Please transcribe this text

[Assistant] And then probably you can add some validation like whether the, uh, these buttons are visible or not. Okay.


[User] Please transcribe this text

[Assistant] From here, we'll go to the cart and we'll take this name, like whatever value we have added. And then we'll simply log out. Once we do the log out, then again, we will log in with the same credential with the same user.


[User] Please transcribe this text

[Assistant] And we'll check like the previously added values there in the cart or not. Okay, very simple test case, but it will take some time. So we'll recommend you to watch the video fully to understand it better. Okay.


[User] Please transcribe this text

[Assistant] And what page is this? This is basically kind of like our homepage, I can say. So if you go and click on this logo, you can see like we have like common dash home.


[User] Please transcribe this text

[Assistant] Not dash common slash home. And this is basically like our homepage from the homepage. I'm going to keep a menu sections like home, special hot, uh, blog and all the stuff. Okay. Just to give you some idea, I will do that, but you can change as per your requirement. Okay. So let me get a class here.


[User] Please transcribe this text

[Assistant] And that's going to be like home page dot TS. And of course we have to write our class.


[User] Please transcribe this text

[Assistant] And within the constructor, we are going to receive the public page and that's going to be of type page and we can click that. So we'll get the import statement automatically. Okay. Now here's what we need. We need to click on this special hot, right? So we'll say like, click on special.


[User] Please transcribe this text

[Assistant] Link text, I believe, yeah, link text of special hot. So we can copy that and simply I can say like this dot page dot click.


[User] Please transcribe this text

[Assistant] And then within double quotes, single quotes and the value since it's a link text.


[User] Please transcribe this text

[Assistant] Uh, we have to enclose that within a single quotes, within the double quotes. Okay. And of course, this is going to be await and here the method is going to be async. Okay. That's it. Very simple. Uh, I'm going to skip, skip other things just for our test scenario. I'm going to click on this. So one element is fine for now. Okay.


[User] Please transcribe this text

[Assistant] And this is our special, uh, hot page. Okay. So this is going to be a separate class. Okay. So I'm going to create another class like special.


[User] Please transcribe this text

[Assistant] Uh, page dot ts. Okay. Again, let's write a class, special class.


[User] Please transcribe this text

[Assistant] And as usual, the same constructor. So what I'm going to do is I'm going to just copy from here and paste over here just to save some time. And then I will just import this one from playwright test. Okay. So to do this input, you can use like control dot and from the selection, you can choose the appropriate one.


[User] Please transcribe this text

[Assistant] I'm also on this first product and we are going to add to cart. Okay. So,


[User] Please transcribe this text

[Assistant] Of course, like you can add some validation and you can do select, you can check for the headers, number of data, like you already know all the testing things, I believe. So let me stick to my scenario now. Okay. So here, what we are going to write is.


[User] Please transcribe this text

[Assistant] I will just write a simple function like add a first product.


[User] Please transcribe this text

[Assistant] To the cart. Okay. Just to make it very simple, I'm going to give this name, which is very easy to understand, I believe.


[User] Please transcribe this text

[Assistant] Now let's go and check how we can inspect this one. So here you can see like once we do the mouse over, then we'll get this particular button. Now I click and click. And here I can see like we have this button called with a title called add to cart. Okay. And yeah, we got the X path, but this is like.


[User] Please transcribe this text

[Assistant] So totally we have 8 buttons with the same xpath, but the first one is what we are going to take.


[User] Please transcribe this text

[Assistant] But since we are using the locators, the behavior is like strict. Uh, so what we can do is.


[User] Please transcribe this text

[Assistant] We can use like nth of one. Okay. So that should be fine. I believe, uh, nth of zero, I guess. Yeah. Okay. Let's go and check. Okay. So what I'm going to do is first of all, of course we have to mouse over on this guy to bring this on, right? So let's go and inspect this particular element and I will just add this here as of now.


[User] Please transcribe this text

[Assistant] So this is what, this is an image and yeah, this is an image with iPad touch. Okay. Uh, not 10 proper things, I guess. Yeah. Okay. So here what we'll do, this one is the correct, I think.


[User] Please transcribe this text

[Assistant] Okay, so we have a class called image and within that we have a tag. Okay, let's go and write that one. I think we should go with the xpath, not the css. So double slash dev at the rate class equal to


[User] Please transcribe this text

[Assistant] Uh, hover is the function, right? Hover and the element.


[User] Please transcribe this text

[Assistant] Okay, let me comment this line. So this dot page dot hover, and we have to pass the selector.


[User] Please transcribe this text

[Assistant] Once we do the mouse hover, is it straight? I don't think it's a straight one. Uh, yeah, it's also straight, but I'm going to make it false. Okay. So within the.


[User] Please transcribe this text

[Assistant] Options what we can sell as we can strict equal to false strict in the sense like it will.


[User] Please transcribe this text

[Assistant] Uh, if multiple matches found, it will fail that one. Okay. It will say like strict violation error. I think that we already discussed in our some video. Okay. So I'm going to make it false. Okay. Then what I'll do, then I will say like await and then followed by.


[User] Please transcribe this text

[Assistant] Uh, this guy, right? So once we do the mouse over, we'll get this particular X path. We'll take that one. So wait this dot page dot locator.


[User] Please transcribe this text

[Assistant] And the locator value is this one dot n of zero or one. So it's index. So it will start from the zero and then I'll say like dot click. So that should be.


[User] Please transcribe this text

[Assistant] Uh, this action. Okay. Once we do the click here, you can see like we got like view cart and checkout. So let's go and, uh, write some assert for this. Okay. So view cart is there, right? So yeah, it's already disappeared.


[User] Please transcribe this text

[Assistant] Okay, so for the view cut, I have already written this. So we have a X path like view cut and


[User] Please transcribe this text

[Assistant] We have something like this, okay. So we'll wait for the locator to be visible. Once that is visible, then we will return that particular locator. Okay. So now let's go and.


[User] Please transcribe this text

[Assistant] Let's have a quick recap actually. So here you can select, we have this registration page.


[User] Please transcribe this text

[Assistant] Where we have our constructor and here enter first name, enter last name, enter email, enter telephone, enter password, confirm password.


[User] Please transcribe this text

[Assistant] And is subscript checked. Here I have done a small modification like previously we are using like a dot is visible, but here we'll just return only the locator. I will tell you like how to use the web first assertion.


[User] Please transcribe this text

[Assistant] Then we have the homepage where we are going to click on this particular, uh, special hot menu. And here previously we are using link text, but I have changed that to X path. Okay.


[User] Please transcribe this text

[Assistant] And then we have this special hot page where we will add this function, like add first product to the cart.


[User] Please transcribe this text

[Assistant] So we'll do the hover and we'll click on the first one, the add to cart. That's it. And toast visible is there. Okay. Now let's write some test. So already we have a folder called test where we have learned all our playwright basics.


[User] Please transcribe this text

[Assistant] Not touch that folder, rather I will just go and create a new folder called pom-test.


[User] Please transcribe this text

[Assistant] And within that, I'm going to create a test file. Okay. So I'll name it like had to cart.


[User] Please transcribe this text

[Assistant] .test.ds file. You can name it like .spec.ds as well, which is absolutely fine. Okay. So first of all, we'll do the import. We'll import the test, uh, from Layrite test.


[User] Please transcribe this text

[Assistant] And of course we need a test block. We'll create that one. Let's name it like register.


[User] Please transcribe this text

[Assistant] And I'm going to give some identification like 01. Okay. And here we have to import all the classes that we have created. Okay. So import then followed by what is the class name? So first class name is my register, register page.


[User] Please transcribe this text

[Assistant] Uh, yeah, and also we need the home page. So let's copy and give it here.


[User] Please transcribe this text

[Assistant] Okay, and here it should be like your login.


[User] Please transcribe this text

[Assistant] And this is going to be your home. This is going to be your special hot pages. Okay. So we have done all the imports. Okay. Now within the, uh, uh, test. So if you go to R.


[User] Please transcribe this text

[Assistant] Uh, config file here, you can select, we have something like base URL. So base URL is nothing but the.


[User] Please transcribe this text

[Assistant] This route only we need and this first part is going to be a static. So I have kept that in the base URL. Okay, now let me go and write the test.


[User] Please transcribe this text

[Assistant] I will tell you how to use it. Very simple. Here we have to call like base URL. That's it. Okay. Uh, all this are coming from the concept of fixture. We'll talk about that detail in our next video. Okay. So here we'll say like a wait, uh, page dot go to.


[User] Please transcribe this text

[Assistant] Register equal to new register page.


[User] Please transcribe this text

[Assistant] Uh, and of course we want the enter confirm password. Let's bring this together. Enter email. What else we have?


[User] Please transcribe this text

[Assistant] Enter telephone, right? So here we'll say like, uh, let's bring this up as well. Yeah. Await. Register.


[User] Please transcribe this text

[Assistant] 1, 2, 3, 4, 5, 6, 7, 8, 9, 0. Okay, that's fine. And enter password is like caustic at the rate 1, 2, 3. And this password is going to be like at the rate 1, 2, 3.


[User] Please transcribe this text

[Assistant] And here what else we have? Uh, that's it. One, two, three, four, five. Yeah. So, five is done. Yeah. We'll remove this one. Okay. Now here,


[User] Please transcribe this text

[Assistant] Like enter email, right? So we want this email to be used in our next test as well. So what I'm going to do is I'm going to say like, uh,


[User] Please transcribe this text

[Assistant] This as my global, uh, data. Okay. So I'm going to select that control dot. I will get some menu like this and I will say like export to constant in module scope. Okay. And this is going to be, that means like we are saving this data as a variable in the.


[User] Please transcribe this text

[Assistant] Okay, not a class, this is not a class file. So this like your test level, that means like out of the scope, out of the test also, we can use this for our another test. Okay. And similarly the password as well, like the password is also going to be, uh, like we have to reuse. So we'll just change this.


[User] Please transcribe this text

[Assistant] And this confirm password is also going to be same. So I'll just, uh, utilize password. Okay. That's it. Do we need the first name and the last name? Not now, uh, maybe for


[User] Please transcribe this text

[Assistant] Some kind of assertion, we can use that, like we can store anything in the data variable and we can use it, right? That's it. So until last name, let me give like chatachi.


[User] Please transcribe this text

[Assistant] Okay, so first name, last name, email, telephone, password, confirm password. That's it. Okay. Now here we have some kind of validation like we'll check like whether the checkbox is subscribe button is enabled or not. Okay. Of course it should be no and it should be enabled. Right. So here I can say like await, not await. We'll use the expect directly and I can say like register.


[User] Please transcribe this text

[Assistant] To be checked actually, but here if you go to the, here we are getting the locator element, okay. So here we are getting the locator. So what we can do is, we can, sorry, this should be expect not export.


[User] Please transcribe this text

[Assistant] Okay. And here it should be like to be checked. Okay. That means this is known as, uh, playwright web first assertion. Okay. So here within this, we are returning only the locator. So we can get that locator and here we can select to be checked or else like we have to use like to be checked. And here we have to check with the expect with the true, right?


[User] Please transcribe this text

[Assistant] So instead of that, we can write this very simple thing. Okay. So,


[User] Please transcribe this text

[Assistant] Yeah, that's it. Pretty much simple. Next we have to click on this term and conditions. Okay. So here I will say like a wait, then followed by register dot click, term and condition. And then I'll say like a wait, register.


[User] Please transcribe this text

[Assistant] Okay, so that's it. Very simple thing. Okay. So here, if you go to the continue to register, basically we are just doing this continuity button, right? But we have to wait until the page gets loaded completely. So what can I do is I can simply say like, wait promise.


[User] Please transcribe this text

[Assistant] And within this, I can say like, uh, this dot page dot wait for.


[User] Please transcribe this text

[Assistant] Navigation and if you want, you can give something like a wait until and I will say like a network ideal. Okay. So we'll wait until the page loads entirely. Okay. And then we can say like this dot, uh, the continue button. Okay. So that's a very simple thing. Okay.


[User] Please transcribe this text

[Assistant] So yeah, that's it. Okay. Now let's go and check this quickly. So here I'm going to run this. So I'm not getting that execute button. So within the config file here already, I have given like pom test slash add to cart dot test.ts. Okay. Now let's go to this one.


[User] Please transcribe this text

[Assistant] Let's go to the test runner and add to cart is there, register is there, right? Okay. Let's go and run this now from the which VS code plug-in.


[User] Please transcribe this text

[Assistant] So here you can select it went to the account slash register, that is the use of base URL and it click on the continuity button and it loaded until the page loads complete. I mean it waited until the page loads completely. Then of course our test is passed. Okay. Now here, um,


[User] Please transcribe this text

[Assistant] With this data, right? So if we have the email and we have the password with that data, we are going to do the login. Okay. So I'm going to write one more test.


[User] Please transcribe this text

[Assistant] And this is going to be my login test scenario. So I'll name it like test02. Okay. And of course we'll use the same base URL concept here as well. And here I'll say like await page.go to and ampersand.


[User] Please transcribe this text

[Assistant] Within back text and within curly braces, we'll say like base URL and then followed by route. What is this? Login.


[User] Please transcribe this text

[Assistant] Okay, so wait login dot enter email, which is going to be our email and await.