Playwright Beginner Tutorial 7 | How To Find Web Objects

preview_player
Показать описание
00:00 *Intro*
What we are going to learn

01:11 *What are Selectors and Locators*
Selectors are the strings/properties of the web objects
Selectors are used to create Locators
Selectors e.g. CSS, Class, Name, ID, Text, XPath …

Locator is a class in Playwright library

01:43 *Google object locator example*

05:25 *How to find web objects with Playwright*

How to find objects using XPath, CSS, Text, ID etc

10:25 *using any object property*
15:49 *using CSS selector*
20:18 *using XPath*
24:55 *using Text*

28:36 *Screenshot moment*

31:47 *How to find and record object locators using Playwright Inspector*

36:49 *Outro*

References

#playwright #automation #testing

▬▬ RAGHAV PAL ▬▬

Every LIKE & SUBSCRIPTION gives me great motivation to keep working for you

You can support my mission for education by sharing this knowledge and helping as many people as you can

If my work has helped you, consider helping any animal near you, in any way you can

NEVER STOP LEARNING
Raghav Pal
Рекомендации по теме
Комментарии
Автор

Hey, I never write comments but this course has been the best course that I have ever seen on YouTube! Especially for something that isn't as popular as PlayWright. The way that you teach, give examples, tell every detail of how you do things (like what shortcuts you are using, what buttons you are pressing, and etc) are phenomenal. Most tutorials don't tell you and leave you confused. Thank you so much for your time and effort!

PoolMedia
Автор

You're the best, I was struggling with Playwright and now my test work as expected!

jansanchez
Автор

This playlist is extremely helpful. 👌
Thanks, Raghav, I appreciate your efforts.😇

UmeshTawade-plos
Автор

Hi Ragav,

when I was tried await page.locator('id=user-name').fill('Edison'), like the video it should enter the value into the element, However when i checked the inspector logs page.locator('id=user-name')
.fill() it throws this message and Edison is not formulated into that field, can you please give me suggestion for what needs to be done.

Thank you

anuboga
Автор

how to select test time out from config.js if timeout not exist in config.js file?

moatazelsbay
Автор

How could we find search box in windows through inspect?

enderson
Автор

Hi Raghav. Thanks so much for your tutorials. I have been making presentations during sprint reviews and I would appreciate it very much if you don’t mind sharing with me the tool you use to draw the rectangular shapes around the texts on the screen. Thank you.

lyrixghgc
Автор

Hi Raghav

Firstly I want to say how useful these videos are as I am new to coding. Secondly, at 12:22 the object was identified and worked for me too but when i clicked on step over it didn't click in the username field but instead my inspector stopped. Can you please let me know what could be the reason.

Thanks

MamzP_
Автор

I am stuck at scenario like if you have 5 images and each image has header and link, want to cover in a single iteration.please help me on this

devgagra
Автор

Hi sir could you please help me to solve the issue in playwright with js i have requirements like if I have to create some data on web ui and then I have to click save as button on web ui.if i click on save as the desktop save as window will open there i can edit file name and click on save button to save the ui data in local.but i don't have input file option to do with playwright . Could you help me to solve this issue .

sanjeev
Автор

Hi Raghav, thanks for the series. Can you please help me in the following. When I am trying to get the dropdown options using the following code, I am getting null and undefined values on lines 1 & 2 respectively. Plese help here.
const state=await page.$('#state');
const stateoptions=await state.$$('option');

sravanthik
Автор

Awesome tutorial series. Question: Has Explore feature on Playwright Inspector been deprecated? I just downloaded on Mac and don't have the option.

j.
Автор

Hi Raghav, my application has lot of drop downs, radio button and checkboxes how to select a value from them?

sirishapochiraju
Автор

Nice video... You are for sure an pal in automation (couldn't resist, sorry ;) )

thomasanoniem
Автор

One debate when talking to others is what selector type is best to use. Some say ID some say Xpath. When all are available to an object on the browser which selector type is best to use and why? Is there an order of best to least desirable selector type to use? Thanks so much!!

tomcarter
Автор

Can we do automation testing by playwright on a Flutter web page?

RushikeshWasule
Автор

how to see what happen during uploading to pdf files to my web app in backend?

moatazelsbay
Автор

Thank you for your lecture.

I've test many times, under line

await page.click('id="user-name"')

but debug window's 'step over' and other buttons are disabled at this line.
so I change like this

await

it is worked.

Could you check this please?

hooncli
Автор

in my code i insert
var hrefs = await page.evaluate(() => {
return => item.href);
});
but i have different result with or without --header
how can i solve this?

almanaccoabruzzese
Автор

HI Raghav, for css selector do we need to give # before the locator? for ex: login-button is the locator #login-button

sirishapochiraju