Find Multiple Elements | Playwright - Part 12

preview_player
Показать описание
Let's learn how to find multiple elements in the playwright.
We are also going to explore the "for await" and "map" functions.

Playwright - auto wait cheat sheet

Source code:

Timeline
0:00 Find Multiple Elements
3:40 $$ function
10:00 for await
12:00 map function
16:00 Recap

#playwright​ #letcode

Join our WhatsApp group.
Рекомендации по теме
Комментарии
Автор

Happy to see you back and recovered, Koushik!

iMadeThisThat
Автор

Amazing bro, this is the first video I watch from this playlist Will watch the rest for sure! thanks subbed!

RTCDigitalS
Автор

Bro, even with latest playwright versions, let us assume I am fetching multiple elements using a locator. Then I am using all() method to take it as an array. Thn for iteration which one is advisable " for-await-of or for-of (without await)

abhishekbhardwaj
Автор

Hi how to put if condition in playwright run two parallel workers chronium and iphone5 if i put only chronium browser page.locator then he pass chronium test cases and iphone workers test fail.
give me suggestion

nomanshahid
Автор

Using Page Object Model(POM)can you please help how to search with debounce and also the radio buttons should populate when displayed

hemagg
Автор

how to find multiple elements using python? which locator or selector should i neeed?

ffgaming-fecx
Автор

Hi Koushik,
You mentioned that page.$$(locator) will not wait for all the elements to load and for that page.waitForSelector(..) has to be added. I face this issue in case of frame. But I don't find any function called waitForSelector(..) in frame. Can you suggest any solution here? All that I need is to find multiple elements that matches a locator inside a frame.

AliKhan-wmlt
Автор

how can i click to an element?
for examle
if(...)
await page.$$('').click()

danielkovacs
Автор

bro... repos print aaguthu
adhukku assertion epdi???

jeyaprakash
Автор

How can I click on a selective url - for e.g - if there are multiple elements inside the repos array, and I want to click on the first link of that - how to do that?

ghummakad_premi
Автор

Hi Koushik,
I am trying to execute the typescript test as

test("Verify login", async () => {
try{
page.type('loginInput', userName);
//some code
}
catch(error){
console.log('print error here', error);
}
}

test.afterAll(async () => {
console.log("Teardown
}

Here, If I am facing any locator issue it just comes out of tests and executing test.afterall() and then going back to catch block in test()
Is there any way to handle the locator exceptions (if it's unavailable due to page load/some wrong locator), I want to print the exact error / exception

mdileep
Автор

How do we add a listener?
If we want to stop the execution of the test case if an error element is displayed on screen, what can be done?

Only workaround I have is, after each step we should expect the element is not visible.

shanmuktej
Автор

Are they any situations where GUI objects cannot be recognized using Playwright, both browser and windows based screens, can u please enlist here

yotuber
Автор

in case of $$, wont playwright wait for default timeout ?

sunnysachdeva
Автор

Hi how to get tooltip text in playwright

mudaseer
Автор

How do you find multiple elements by using the page.locator function?

danielstoicamusic
Автор

Nice Videos and lot of efforts here. Just needed some pointers on hover and reading hover text. Could not find anything relevant.

maheshshet
Автор

Hi Koushik - do you have any email where I can reach to you pls

dollygrover
Автор

your name is bengali but accent is Tamil... whats the story here ? is it Triveni academy ?

SouravBasuRoy