LambdaTest is an AI-powered unified test orchestration and execution cloud that enables developers & testers to run manual & automated tests at scale. It has over 10,000 customers and over 2M users in 130 countries.
𝐂𝐨𝐫𝐞 𝐎𝐟𝐟𝐞𝐫𝐢𝐧𝐠𝐬:
𝐂𝐨𝐧𝐭𝐢𝐧𝐮𝐨𝐮𝐬 𝐓𝐞𝐬𝐭𝐢𝐧𝐠 𝐂𝐥𝐨𝐮𝐝: 70% faster & more scalable than in-house grids
𝐁𝐫𝐨𝐰𝐬𝐞𝐫 𝐓𝐞𝐬𝐭𝐢𝐧𝐠 𝐂𝐥𝐨𝐮𝐝: Supports 3000+ browsers, OS & real device environments
𝐑𝐞𝐚𝐥 𝐃𝐞𝐯𝐢𝐜𝐞 𝐂𝐥𝐨𝐮𝐝: Supports mobile app testing on real mobile & OTT devices
𝐀𝐈-𝐏𝐨𝐰𝐞𝐫𝐞𝐝 𝐕𝐢𝐬𝐮𝐚𝐥 𝐑𝐞𝐠𝐫𝐞𝐬𝐬𝐢𝐨𝐧 𝐂𝐥𝐨𝐮𝐝: Ensures visual appearance & functionality remain consistent & error-free
𝐀𝐈-𝐏𝐨𝐰𝐞𝐫𝐞𝐝 𝐓𝐞𝐬𝐭 𝐀𝐧𝐚𝐥𝐲𝐭𝐢𝐜𝐬: Offers detailed & actionable test execution data & closes the gap between data, insight, & action for better & faster decision-making
Explore: www.lambdatest.com
Disclaimer: The channel content complies with the Fair Use Guidelines under Section 107 of the Copyright Act. All rights reserved to © 2024 LambdaTest. Any illegal reproduction of content will result in immediate legal action
Пікірлер
vscode is easy than eclips
How to take screenshots of every step
Thanks!! You did a great job.
Glad it was helpful!
Short & Sweet
Glad you liked it🙂
I have this question, Why Should I go with Proxy or adapter pattern when similar thing I can do with creating an utility class and then keep the TypeText() kind of methods there which will actually clear and then use sendkeys and other new methods can also put in that utility class where expected condition will be checked too before finding element.
Hi, When you use Proxy or Adapter patterns, they enhance your test scripts by separating concerns, improving flexibility, and adhering to design principles like SRP and OCP, compared to a utility class.
Hi can I learn playwright with no JS or TS skills ?
Hi Dwayne, Yes, you can learn Playwright without prior JavaScript or TypeScript skills, but familiarity with these will enhance your understanding and efficiency.
dear how we can implement hooks using cucumber in cypress ?
@SyedUsama-q3d , To implement hooks using Cucumber in Cypress, install `cypress-cucumber-preprocessor` and configure it in `cypress/plugins/index.js`. Then, use `Before` and `After` hooks in your step definition files. I hope I was able answer your query :)
Hi, thanks for posting that, just starting. I was wondering if you had to answer what would be the best tool for automating frontend (web browsers) currently? Playwright, Cypress, Selenium or smth else? Would love to hear your take on it.
@marcinnalborczyk8576 Currently, Playwright and Cypress are considered the best tools for automating frontend (web browsers) due to their modern features and ease of use. Playwright offers robust cross-browser testing capabilities, while Cypress provides an excellent developer experience with fast execution and easy debugging. Selenium remains a strong choice for its extensive community support and versatility across different browsers and platforms. Hope this answered your query :)
@@LambdaTest Thanks alot for quick and extensive reply. Yes it answered my question and brought more understanding. In terms of programming languages is there any difference whether I use Java or JS with Playwright or Cypress?
@marcinnalborczyk8576 , Yes, there are differences: Playwright: 1. Java: Playwright has official support for Java, allowing full use of its features. 2. JavaScript/TypeScript: Full support, with more examples and community resources available. Cypress: 1. Java: Not supported. Cypress is primarily built for JavaScript/TypeScript. 2. JavaScript/TypeScript: Full support, with rich documentation and community support. For Playwright, you can choose either Java or JavaScript, but for Cypress, you must use JavaScript. I hope this helps. : )
@@LambdaTest yes it does, thanks for taking the time to answer
𝐆𝐢𝐭𝐇𝐮𝐛 𝐋𝐢𝐧𝐤: github.com/automatenow/web-automation-using-wdio
Can we perform code coverage from selenium end to end tests?
@tarunpatel05 Yes, you can perform code coverage with Selenium end-to-end tests by integrating tools like Istanbul to collect and report coverage data. Istanbul is widely used because it integrates well with JavaScript applications, provides detailed coverage reports, and supports various test frameworks. It is reliable, has strong community support, and offers features like source maps and HTML reports, making it a popular choice for code coverage. Hope this helps :)
I'm working on a test where I have I get an alert with two options: Ok and Cancel. I have to click Ok to continue with the test. When I do the steps manually then the alert appears and I can click Ok and proceed with the test. When I do it with Playwright, then the alert just doesn't appear so it continues without that which leads to some changes on the page not being saved. What can I do for that? Is there something that I have to change in playwright config that could be causing the alert to not appear?
Hi Damanbir, It sounds like the issue with Playwright might be related to the way it handles JavaScript dialogs such as alerts, confirms, and prompts by default. Playwright typically auto-dismisses these dialogs, which might explain why you don’t see the alert when running your tests. You can manage this behavior by setting up an event listener for the dialog event, which will allow you to intercept and interact with dialogs programmatically.
Thank you for your help. I had figured it out after I left this comment. I just had to add the dialog handling before the action that triggers it. I was clicking on a button that would trigger a JS alert but because I was handling it after that, it was already dismissed by that time. When I worked with Selenium, I would trigger the alert first and them handle it so that confused me. Once again, thank you.
Can u plz provide ppt that u have used in the video
Thank you so much for your interest! Unfortunately, we can't share the entire PPT, but we're happy to answer any questions or provide additional information you might need.🙂
Hello, Thanks for this video, Can you share how to take screenshot of the file for example a PDF on cloud or a from local machine
Hi Rohit, To take a screenshot of a PDF file from either a cloud storage or a local machine, you can use Python with libraries like pdf2image and Pillow.
Can you create a function in a fixture that contains multiple methods from your POM file then use it in the test? because currently I put this async functions below after my test describe group???
Hi Christian, Yes, you can do this by defining the fixture to return an instance of your POM class, and then call the fixture in your test describe group.
FYI: "type" is now deprecated (at least in version 5.4.5 which vscode uses currently)
Thanks, Brandt
@18:31 "It's not that easy my friend." 😄
hello. I tried to find for inner frame ( nested frame ) but nothing works out for me , in browser its highlighted . but in code its not working ? could you tell me what might be the reason? i got no such element exception .this is my css selector By.cssSelector(".has-background-white") and i tried for xpath also but nothing works here in code ? in browser css and xpath both are highlighted --> //[@src='innerFrame'] works well in browser .
You're a good teacher! Thank you!
Thanks Thalaiva
Thank you for the the tutorial, it has been really helpful.. At 1:45 you said there was a failure and the screen shot which was captured was only of the last step. So how do we get the screenshot of the step which actually failed instead of last step?? Also can we code in a way that of there is a failure take a screenshot by scrolling into view of the element which had a failure??
Hey @avanigarimella1220 , to take the full page screenshot follow this guide this might be helpful to your query : www.lambdatest.com/blog/playwright-screenshot-comparison/
very clear and thankyou
This is a brilliant tutorial and helped me set up my first Playwright project. May I ask if you have any recommendation on how to read a local html file and what libraries I can use to generate a PDF from it?
Hi Alex, To read a local HTML file, these libararies can help: - playwright: For launching the browser and interacting with the web page. - fs: For reading the local HTML file. - path: For handling file paths.
Hi Kouhsik getting error when removing console line error- Please find error details below Running 1 test using 1 worker · Error: expect.toHaveAttribute: Target page, context or browser has been closed Failed worker ran 1 test: [chromium] › tests\scrollfunsction.spec.ts:5:5 › check scroll funstion at scrollfunsction.spec.ts:10 8 | const messageInput=page.locator("//input[@placeholder='Please enter your Message']"); 9 | //console.log(await messageInput.getAttribute("placeholder")); > 10 | expect(messageInput).toHaveAttribute("placeholder","Please enter your Message"); | ^ 11 | 12 | 13 | at c:\Playwrightwithyml\tests\scrollfunsction.spec.ts:10:26 1 passed (6.3s) 1 error was not a part of any test, see above for details
Hi Sonali, Seems that the page or browser context you are trying to interact with has already been closed before your test could complete the assertion.
as more as possible
Thanks It helped me A lot , You are really very good at explaining stuffs
Glad you liked it! Do subscribe to the channel for more such tutorials🙂
How to print a default selected value of drop-down
Hi Bhushan, To print the default selected value of a drop-down in Playwright, first select the drop-down element using a locator, then use the inputValue() method to retrieve the selected value.
how to avoid creating page instances in every test in a single file in javascript
Hey @aparnausa3619 , To avoid creating page instances in every test in a single file in JavaScript, use setup (`beforeAll` or `before`) and teardown (`afterAll` or `after`) hooks to create and close the page instance. To learn more about these hooks follow this guide : www.lambdatest.com/learning-hub/javascript-automation-testing . Hope this helps
Mochawesome folder is not generated when using --parallel flag. Anything changed there ? It works when i remove the --parallel flag
Hey @puneetoist1987, you can try looking at the official document when dealing with parallel Mode: www.npmjs.com/package/mochawesome#parallel-mode
i have read the comments and i am going to start watching right from today
Great !! All the best
Thank you it was really helpful, Can you please do video on csv files and how to verify the rows init.
Thank you for your suggestion! A tutorial on handling CSV files with Playwright and TypeScript, including verifying the rows, sounds like a valuable topic. We'll consider exploring this in future videos.
Hello, what extention do you use to see all the selectors in the browser?
The extension used to get all the selectors is "LetXPath", you can get it from the chrome web store.
@@LambdaTest thank you!
Any real time project ? where I can do real time practise including ci/cd pipelines
@prikshitverma3885 , you can watch the Jenkins video tutorial in this you have everything covered including the real-time workings of automation with CI/CD Pipeline using Jenkins. Hope this helps :)
Hello Sir, Is JS or Typescript knowledge a pre-requisite for this course?
Hello @AdlBnymn , Would be better if you have basic syntax and understanding in place.
not helpful for windows at all.
Hi Niraj, Could you please share more details about the issues you encountered on Windows?
@@LambdaTest I had issue with setting up the Environment variables on windows. I was confused which variables to set: User variables or system variables. So, setup the same path in both user and system variables and it is working now. Thanks for your reply.
Why we incapsulate our code?
Hi Pranav, This is done basically for organizing test code into modules or components that can be reused and managed independently.
Como cancelar la membresía?
Hi Jeremy! ¿Podría especificar a qué membresía se refiere?
Thanks for case with timeZone, it's helpful for me.
Glad it was helpful!
Thank you
How to do the code of line 22.
Hi Sai Sowmya, Could you please provide the specific timestamp where the code is shown?
@@LambdaTest ok Thank you
How to copy from inspect content to the code
Hey @saisowmya3320 , You can follow the below steps to copy content or an web element from inspect 1. Right-click on the element in the webpage and select "Inspect". 2. In the Developer Tools, find the HTML code for the element. 3. Right-click on the code and select "Copy". 4. Paste the copied code into your code editor. 5. Make any necessary adjustments and test your code. To get guidance on how to inspect elements irrespective of Mac or Android Devices or Web browsers, you can follow this guide. The initial inspect remains the same. www.lambdatest.com/blog/how-to-inspect-elements-on-android-devices/
Copy as what element or outerHtml, selector, js path, styles, XPath, full XPath.
Hi Sai Sowmya, It depends on your needs: use "Copy as HTML" for the element's code, "Copy selector" for CSS targeting, "Copy JS path" for JavaScript access, "Copy styles" for inline styles, "Copy XPath" for XPath queries, and "Copy full XPath" for XPath targeting.
Pero puedes hacer esa configuracion utilizando appium 2.0 con appium java client 8, porque segun tu ejemplo parece que usas el java client 7 de appium. Se agradece bastante. Saludos.
Hi Karla, Sí, puedes ejecutar pruebas de Appium en LambdaTest con Appium 2.0 también, como se muestra en el tutorial. ¡Me alegra que te haya gustado!
thank you this is great
Glad it was helpful!
how can i get these notes
Hey @uviiifittrackstravels to get step-by-step guidance on how to install Appium you can surely refer this blog www.lambdatest.com/appium , and go the section how to install and configure Appium Hope this helped :)
How to calculate CPU usage (in%) like we see in performance monitor ? )
Hi Anton, To calculate CPU usage in percentage using Selenium 4 with Chrome DevTools Protocol (CDP), you can leverage the Performance domain, which provides performance metrics directly from the browser.
@@LambdaTest hello ! I used your example, but there are planty of another metrics ) I need CPU usage (the same metric as you can see in Performance monitor) in %. Is it possible at all ? I suppose that % can be calculated only. But I don't know how ))
Hi Anton, If you're interested in tracking the CPU usage of the browser process itself, you might get some indirect metrics via browser performance tools, but these won't directly give you CPU usage in the traditional sense (like that shown in Windows Task Manager or other system monitors).
@@LambdaTest yes but chrome can calculate this in % anyhow, I just want to get this value =)))
Hi Anton, To directly calculate CPU usage as displayed in the Performance Monitor (typically as a percentage), you generally need to access system-level APIs or utilities that provide this information. Selenium itself doesn't have built-in capabilities for monitoring CPU usage because it's focused on browser automation rather than system monitoring.
What a fantastic job, mate. Here from Brazil and that´s the best tutorial, just love <3
Glad you liked it! Please subscribe the channel for more such videos🙂
Loved the Video Kaushik! Just a quick query, could you refer me to the video in which you explained the getting xpath concept? I didn't seem to really get that how we copied that. Would really appreciate that! THANK YOU!
Hey @gauravgulati5490 , Glad you enjoyed the video. For understanding the concept of getting XPath, you can check out this video: kzread.infoXx9gCdnxHeo As, we don't have any specific video by Koushik on this. You can also go through this blogs: www.lambdatest.com/blog/complete-guide-for-using-xpath-in-selenium-with-examples/
Short and sweet good luck bro. Love from India
Glad you liked it! Please subscribe the channel for more such videos🙂
My gosh, it's too complicated. I'll try to get a mac mini instead. More easier. 🤷♂
Hi Luiz, Could you let us know the challenge you're facing?