Frames | Playwright - Part 11

  Рет қаралды 9,678

LetCode with Koushik

LetCode with Koushik

Күн бұрын

Пікірлер: 58
@Mona001-01g
@Mona001-01g Жыл бұрын
Does letXPath work on elements? I have installed letXpath but elements do not get inspected. Not sure how your letXPath in 7:06 is able to inspect. Is there a special setting that i need to turn on? Thank you!
@letcode
@letcode Жыл бұрын
No special setting, it works well if there is only 1 frame in the page.
@rafaelbitencourt6021
@rafaelbitencourt6021 3 жыл бұрын
Thanks for the great video! Suggestion to invert the if/else checks and short-circuit if the frames are not present by throwing, to avoid extra indentations, ie.: if (!frame) throw new Error('No such frame') await frame.fill ... await frame.fill ...
@letcode
@letcode 3 жыл бұрын
Thanks for sharing, I'll try it.
@andiberisha9352
@andiberisha9352 2 жыл бұрын
Thanks for the video pal really helped me with my query. Quick question, what is that dev tools window which shows you xpath and css examples for the element you're currently highlighting?
@letcode
@letcode 2 жыл бұрын
Hi, I'm using LetXPath, it is available in Chrome store.
@rameshpadi2168
@rameshpadi2168 2 жыл бұрын
Hi Koushik, How to implement Inheritance concept in Playwright.
@letcode
@letcode 2 жыл бұрын
kzbin.info/aero/PL699Xf-_ilW4FuazWjbnRm0PPCltz25pz
@para83July
@para83July 2 жыл бұрын
hello Koushik, how to click on an element that is nested in object->#document->html->body rather than in directly. there is no tag available but the element is inside the object
@letcode
@letcode 2 жыл бұрын
I think it's shadow DOM, r u getting any exceptions?
@matchsuper559
@matchsuper559 3 жыл бұрын
Completed the series and learnt a lot in a short span of time, need to practice :D. Awesome video content Koushik. will there be any more videos in this series. Some suggestion : - Integration with CI like Jenkins, Teamcity etc.. - Reports - Parallel test execution - Read data from fixture files like CSV, json. Setup project for environments (DEV, CI, QA) - Organize tests in such a way so that common actions can be reused. Did you come across any documentation that playwright suggest to use POM framework or anything else. For e.g. I think I read somewhere in cypress docs that POM as anti pattern and they recommend to use commands. One scenario like there is Product Details screen. In order to access Product Details screen, User has to login first (Login Page), then perform Product Search (Product Page) and then from search user accesses the Product Details screen (ProductDetails Page). So if i have to write tests in Product Details i should be able to reuse Login and Product search any ideas. How to go about it. - Setup VS Code plugins for code formatting, ESLint etc...
@letcode
@letcode 3 жыл бұрын
Thank you. Everything coming soon 😃. All you questions related pom will be answered in upcoming pom videos.
@SamPrince
@SamPrince 3 жыл бұрын
These videos are really useful. Tried to access an in our application a few months ago without any luck. I think because the frame was from a different host (separate reporting server generating content served into the ) and some browser security issue prevented Playwright's access to it. Possibly more recent Playwright versions have worked around this issue?
@letcode
@letcode 3 жыл бұрын
Yes may be issues with CORS, check with the recent version of playwright. If you can provide the application probably I can try.
@SamPrince
@SamPrince 3 жыл бұрын
@@letcode Thanks - searching with "CORS" helped me find a bug report on playwright which indicates that it should be possible to disable those checks with the argument "--disable-web-security", but for an unresolved bug in Chromium which means that arg has no effect on s. Sadly the Chromium bug is approaching its 3rd birthday :(
@SamPrince
@SamPrince 3 жыл бұрын
Possibly these args in combination will solve it... '--disable-web-security', '--disable-features=IsolateOrigins,site-per-process' need to do a bit of testing!
@letcode
@letcode 3 жыл бұрын
Yes, also do let me know..... We know the pain of reproducing issues 😌
@victor3848
@victor3848 3 жыл бұрын
like it good job 👌. waiting for Test case like ✔run multiple .ts file(testSuite) ✔html report Generation, ✔screenshot on failure, & 👀✔ Base class where we have beforeAll & afterAll
@victor3848
@victor3848 3 жыл бұрын
And again Nice one man 👍
@saivamshikrishnapeddammala8678
@saivamshikrishnapeddammala8678 2 жыл бұрын
Hi Koushik, How to Navigate to DefaultContent (defaultframe) after switching into childframes
@letcode
@letcode 2 жыл бұрын
There is no switching concept, Use page to interact with the default frames.
@tanujlakshakar8473
@tanujlakshakar8473 2 жыл бұрын
Hi Koushik Is there a way to wait for iFrame. I have a page with but it sometimes it takes time to load on the page. I would like to assert something on that frame but until and unless load I cannot do anything and my test fails. Is there a way like waitForFrameToLoad() I can use or some hack to handle this case.
@letcode
@letcode 2 жыл бұрын
Yes there is wait available.
@tanujlakshakar8473
@tanujlakshakar8473 2 жыл бұрын
@@letcode I tried waitForUrl(), waitForNavigation() waitForLoadState () but failing to achieve const frame=page.frame({url:/\/landingPage}) await frame.waitForloadState("load")
@ashirbadprusty9327
@ashirbadprusty9327 2 жыл бұрын
Excellent series in Playwright . I have a doubt. I tried to click on a button inside a frame using javascript executor ex: frame.evaluate("document.querySelector(button[id='xyz']).click()") but getting error. When tried with frame.locator("xyz").click() then it's working
@letcode
@letcode 2 жыл бұрын
Thank you, I haven't checked js executor that much I'll check and let u know.
@ashirbadprusty9327
@ashirbadprusty9327 2 жыл бұрын
@@letcode thanks for quick reply
@cristhiamguerrero1700
@cristhiamguerrero1700 3 жыл бұрын
which method do you recommend to wait for a frame to load on the page?
@letcode
@letcode 3 жыл бұрын
It depends on the application, if frame is static then no problem, if it's dynamic then I'll go with frame url
@dragon3602010
@dragon3602010 3 жыл бұрын
awesome I like it 😊 I have a question is there a way to put a debugger and then try some codes on the fly without rerun everything like in a notebook in python Thanks
@letcode
@letcode 3 жыл бұрын
In selenium we can achieve that using debugger address. In playwright I'm not sure. I'll check and let u known ☺️
@dragon3602010
@dragon3602010 3 жыл бұрын
@@letcode thank u very much 😉
@joshuavictor4593
@joshuavictor4593 10 ай бұрын
the website that I was testing does not have frame or .. it just using div.. how can I implement the same technique using div?
@letcode
@letcode 10 ай бұрын
For div it's straight as using locator
@joshuavictor4593
@joshuavictor4593 10 ай бұрын
@@letcode so it is right to say the frame function will not work with div right?
@letcode
@letcode 9 ай бұрын
Yes correct
@gvprod8706
@gvprod8706 2 жыл бұрын
Great video!! I have a question not related to this video. When I run my automation suite, I am getting the following error ERROR: The process with PID x (child process of PID y) could not be terminated. Reason: There is no running instance of the task. Have you ever encountered this error?
@letcode
@letcode 2 жыл бұрын
Hey thanks bro. I have seen this but I am not able to recollect it now.
@ranig9433
@ranig9433 15 күн бұрын
how U are getting that letxpath ,i did not understand
@letcode
@letcode 14 күн бұрын
chromewebstore.google.com/detail/letxpath/bekehlnepmijedippfibbmbglglbmlgk
@jaykishoreduvvuri7598
@jaykishoreduvvuri7598 3 жыл бұрын
Nice one 👍🏻
@letcode
@letcode 3 жыл бұрын
Atleast watch the video 😅 and say nice
@cheap_mechanic9125
@cheap_mechanic9125 3 жыл бұрын
@@letcode He feels nice about the Intro cut i guess
@letcode
@letcode 3 жыл бұрын
Haha.. thanks for creating intro. Credits to you 🤩 @Marvis Philip
@jaykishoreduvvuri7598
@jaykishoreduvvuri7598 3 жыл бұрын
Hey watched it man and said nice 😊
@cristhiamguerrero1700
@cristhiamguerrero1700 3 жыл бұрын
What is the name of the tool you have to see how many xpath/Css items you got.?
@letcode
@letcode 3 жыл бұрын
"LetXPath" chrome.google.com/webstore/detail/letxpath/bekehlnepmijedippfibbmbglglbmlgk
@nikkietadhurve2020
@nikkietadhurve2020 3 жыл бұрын
Hey.....I have recently started using playwright ....and I m struggling to get the in my code as that Iframe doesn't have name.....Iframe attributes are src, title and class(dynamically generated). Please help how to deal with this scenario. I my test I m navigating from one page to the where the Iframe is taking time to load
@letcode
@letcode 3 жыл бұрын
You can wait for the frame to load based in the frame state. Try to find a unique xpath for the frame based on that u can switch. playwright.dev/docs/api/class-frame
@nikkietadhurve2020
@nikkietadhurve2020 3 жыл бұрын
Tried with this.page.&&('#Placeholder > Iframe)......but no luck so far......can you elaborate on page.on('frameattached')
@marcioreino
@marcioreino 2 жыл бұрын
Thanks for the great video!
@letcode
@letcode 2 жыл бұрын
Glad u like it 😊
@89harish
@89harish 3 жыл бұрын
hey Koushik, I have an use case where after clicking a button a frame gets loaded which will take few seconds for the frame to completely load. How do I wait until frame gets loaded and later perform actions on that frame?
@letcode
@letcode 3 жыл бұрын
we can wait till the frame is attached, please go through the link. playwright.dev/docs/api/class-page#pageonframeattached
@tranquocviet8031
@tranquocviet8031 2 жыл бұрын
Hi. Thank for this tutorial. But how I can load frame with selector?
@letcode
@letcode 2 жыл бұрын
Hi, didn't get you bro
Find Multiple Elements | Playwright - Part 12
17:53
LetCode with Koushik
Рет қаралды 17 М.
Window Handling | Playwright - Part 10
20:58
LetCode with Koushik
Рет қаралды 16 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
How To Handle Frames and IFrames In Playwright
13:13
Mukesh otwani
Рет қаралды 5 М.
Working with Iframes in Playwright
5:41
CommitQuality
Рет қаралды 3,5 М.
Handling different types of inputs | Playwright with Typescript & Jest - Part 7
20:53
How To Handle Alert | Playwright with Typescript & Jest - Part 8
11:46
LetCode with Koushik
Рет қаралды 11 М.
Playwright Visual Comparisons | Playwright part - 28
15:37
LetCode with Koushik
Рет қаралды 12 М.
Teaching Neovim From Scratch To A Noob
1:12:55
TheVimeagen
Рет қаралды 239 М.
Google’s Quantum Chip: Did We Just Tap Into Parallel Universes?
9:34