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 Жыл бұрын
No special setting, it works well if there is only 1 frame in the page.
@rafaelbitencourt60213 жыл бұрын
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 ...
@letcode3 жыл бұрын
Thanks for sharing, I'll try it.
@andiberisha93522 жыл бұрын
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?
@letcode2 жыл бұрын
Hi, I'm using LetXPath, it is available in Chrome store.
@rameshpadi21682 жыл бұрын
Hi Koushik, How to implement Inheritance concept in Playwright.
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
@letcode2 жыл бұрын
I think it's shadow DOM, r u getting any exceptions?
@matchsuper5593 жыл бұрын
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...
@letcode3 жыл бұрын
Thank you. Everything coming soon 😃. All you questions related pom will be answered in upcoming pom videos.
@SamPrince3 жыл бұрын
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?
@letcode3 жыл бұрын
Yes may be issues with CORS, check with the recent version of playwright. If you can provide the application probably I can try.
@SamPrince3 жыл бұрын
@@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 :(
@SamPrince3 жыл бұрын
Possibly these args in combination will solve it... '--disable-web-security', '--disable-features=IsolateOrigins,site-per-process' need to do a bit of testing!
@letcode3 жыл бұрын
Yes, also do let me know..... We know the pain of reproducing issues 😌
@victor38483 жыл бұрын
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
@victor38483 жыл бұрын
And again Nice one man 👍
@saivamshikrishnapeddammala86782 жыл бұрын
Hi Koushik, How to Navigate to DefaultContent (defaultframe) after switching into childframes
@letcode2 жыл бұрын
There is no switching concept, Use page to interact with the default frames.
@tanujlakshakar84732 жыл бұрын
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.
@letcode2 жыл бұрын
Yes there is wait available.
@tanujlakshakar84732 жыл бұрын
@@letcode I tried waitForUrl(), waitForNavigation() waitForLoadState () but failing to achieve const frame=page.frame({url:/\/landingPage}) await frame.waitForloadState("load")
@ashirbadprusty93272 жыл бұрын
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
@letcode2 жыл бұрын
Thank you, I haven't checked js executor that much I'll check and let u know.
@ashirbadprusty93272 жыл бұрын
@@letcode thanks for quick reply
@cristhiamguerrero17003 жыл бұрын
which method do you recommend to wait for a frame to load on the page?
@letcode3 жыл бұрын
It depends on the application, if frame is static then no problem, if it's dynamic then I'll go with frame url
@dragon36020103 жыл бұрын
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
@letcode3 жыл бұрын
In selenium we can achieve that using debugger address. In playwright I'm not sure. I'll check and let u known ☺️
@dragon36020103 жыл бұрын
@@letcode thank u very much 😉
@joshuavictor459310 ай бұрын
the website that I was testing does not have frame or .. it just using div.. how can I implement the same technique using div?
@letcode10 ай бұрын
For div it's straight as using locator
@joshuavictor459310 ай бұрын
@@letcode so it is right to say the frame function will not work with div right?
@letcode9 ай бұрын
Yes correct
@gvprod87062 жыл бұрын
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?
@letcode2 жыл бұрын
Hey thanks bro. I have seen this but I am not able to recollect it now.
@ranig943315 күн бұрын
how U are getting that letxpath ,i did not understand
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
@letcode3 жыл бұрын
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
@nikkietadhurve20203 жыл бұрын
Tried with this.page.&&('#Placeholder > Iframe)......but no luck so far......can you elaborate on page.on('frameattached')
@marcioreino2 жыл бұрын
Thanks for the great video!
@letcode2 жыл бұрын
Glad u like it 😊
@89harish3 жыл бұрын
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?
@letcode3 жыл бұрын
we can wait till the frame is attached, please go through the link. playwright.dev/docs/api/class-page#pageonframeattached
@tranquocviet80312 жыл бұрын
Hi. Thank for this tutorial. But how I can load frame with selector?