Тёмный

Selenium Frameworks | POM | PART - 1 | WHY and WHAT about Page Object Model | Sample Implementation 

Learn Automation Online
Подписаться 82 тыс.
Просмотров 86 тыс.
50% 1

Selenium's POM (Page Object Model is more of a Design Pattern than a framework). However, a majority of the selenium community has accepted the Page Object Model as a Framework. Hence, I'm also using the same term.
Application Under Test : www.phptravels...
What will we learn in this video?
1. Why Page Object Model is needed for Selenium Projects?
2. What is Page Object Model?
3. How to achieve the Page Object Model?
4. Building a sample project from scratch for POM structure.
#Selenium #PageObjectModel #POM #JAVA #LearnAutomationOnline
Best way to reach me (replies will be faster): RU-vid comment section
Also, you can follow me on Facebook and Instagram.
Facebook: bit.ly/2TqPlis
Instagram: bit.ly/2Ez36rH

Опубликовано:

 

18 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 118   
@iambadcat0397
@iambadcat0397 3 года назад
அருள்....You're giving confidence on me on daily basis about Selenium Automation.Thank you ...God bless you Man
@LearnAutomationOnline
@LearnAutomationOnline 3 года назад
😊🙏
@automationtester730
@automationtester730 3 года назад
Sir add some more videos to POM like connecting the class with Base class by using Extends keyword and Utilizing the methods that would be great full and requesting use to use geters and setter methods
@gayathrigopal9632
@gayathrigopal9632 3 года назад
most awaited topic... class la onumea puriyala but u made it ji.... thx a lot ji
@rajaselvapreethasenthilaru7550
@rajaselvapreethasenthilaru7550 3 года назад
One of the best tutorial for POM 👏👏
@babuspiker6076
@babuspiker6076 3 года назад
Sir thank you much I'm preparing for interview automation testing then your video are awesome and well understanding with gud example 🙏🙏🙏🙏🙏nandri guruve
@brindakarthick3337
@brindakarthick3337 Год назад
have u got selected?
@revaathypoomalai22
@revaathypoomalai22 Год назад
Hi Sir. I would like to thank you .your videos are awesome. very easy to understand. all videos are very valuable. I have searched file upload and download concepts. I didn't find it any RU-vid with clear explanation. When i saw your video about file upload and download. I have cleared my doubts. Whenever will have doubts, my option is to see your videos. Once again thank you so much for your dedication and videos.
@sai67393
@sai67393 3 года назад
Tq god every day watching automation vedios very useful 🙏
@velmurugan-sy6io
@velmurugan-sy6io 4 года назад
Sir Ur teaching is very nice everyone can easily understand Ur concepts,pls posts important string program interview point of view
@LearnAutomationOnline
@LearnAutomationOnline 4 года назад
Please refer to java interview program playlist. You can find videos on interview programs. To get notifications on the videos, consider subscribing, so that you won't miss any videos.
@mugundhans8536
@mugundhans8536 2 года назад
the step by step explanation is marvelous sir.
@indiansrams0011
@indiansrams0011 3 года назад
Thank you brother , proudly appreciation your valuable effort.
@30537
@30537 8 месяцев назад
Really very helpful, Thank you so much!
@ShakiThegirlNextDoor
@ShakiThegirlNextDoor Месяц назад
Thanks a lot sir🙏
@SuriyaSparrow
@SuriyaSparrow 2 года назад
Bro why are we writting the login test case code again in update profile page while we have already wrote a code for login test case in the first page??
@venkateshkumar1840
@venkateshkumar1840 3 года назад
Hi Arul, Please create reusable function like real time framework selenium reusable function and java method reusable function.
@suriyakb4299
@suriyakb4299 Год назад
Bro hats off bro 🛐🛐
@MrDenesh555
@MrDenesh555 3 года назад
Hi Arul Anna, first of all, I have to Thank You for all your videos. I always feel satisfied and comfortable whenever I watch all your videos. I like the way you narrate the examples, giving depth explanations for every step, fun talks & etc... Keep up the good work, Thanks a lot Again. Well, I have a question, correct me if I am wrong. I am just stepping into automation. As you mention to keep all the findElement methods as "static" to avoid dependency. Assume I am working on a framework if I assigned all the elements as static for all the pages I have in my application, won't I have any issues with memory while running all test cases? Need your guidance.Thanks.
@LearnAutomationOnline
@LearnAutomationOnline 3 года назад
good question. that time, I didn't think of performance issue. thats why in the ongoing series of cucumber, planning to include the elimination of static as much as possible. You can keep the elements private and use getters for accessing them.
@MrDenesh555
@MrDenesh555 3 года назад
@@LearnAutomationOnline Thank you for the response
@rajeshraje1958
@rajeshraje1958 Год назад
Nice video
@thirupathythiru3883
@thirupathythiru3883 2 года назад
Super bro
@priyadharshiniprabhakaran1298
@priyadharshiniprabhakaran1298 3 года назад
Thank u 👏🏻👏🏻
@mariajeniffer2333
@mariajeniffer2333 3 года назад
Tried the code and there is no error on my code but when execution it fails. Error in console is:java.lang.NoSuchFieldError: LINUX. actually my system is windows and im not sure y such linux error...Did this as maven project and all dependencies are present. Is this error with Jar/configurations ?Kindly assist me to proceed further
@vidyashri75
@vidyashri75 5 лет назад
please do in English sir , your videos are very good
@sivakumar-my9el
@sivakumar-my9el 3 года назад
Hi bro, I'm gradually learning automation testing from your videos . Thanks for that. And now in this part I can't able to get "LoginPageObject" ..how can I get this.! (Is the reason of library missing or I'm using intellij) Please give solutions for this.. otherwise I can't move to next video..
@karthikeyansugumar20
@karthikeyansugumar20 5 лет назад
Here you have created two classes - 1.loginTestCase 2.updateProfile & two page objects. Instead we can create one class & one page object which will reduce the codes further rite?
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
the objective of Page object model is to have separate classes for separate page objects even if there is only a single element on that page. Updating the profile and Login are two different test cases. It should be kept separately. Code reducing is not only the main reason, code modulairty. Maintainable large code is better than tightly coupled small code.
@karthikeyansugumar20
@karthikeyansugumar20 5 лет назад
@@LearnAutomationOnline ok got it
@PriyaDharshini-bf1hq
@PriyaDharshini-bf1hq 2 года назад
sir ..i have a doubt public void displ(String name) { } main(){ disp("priya"); } method call panumbodhu paramater la value va double quote la dhana pass panuvom munadi lam..ipo neenga driver nu direct a podreenga err katala
@LearnAutomationOnline
@LearnAutomationOnline 2 года назад
What’s the type of the parameter? If it’s a string and you are directly giving the value it has to be inside double quote. If you assign it in a variable and sending it, you don’t need double quote. Watch the code again. You will understand
@PriyaDharshini-bf1hq
@PriyaDharshini-bf1hq 2 года назад
@@LearnAutomationOnline ok sir
@vvignesh1333
@vvignesh1333 2 года назад
Anna, application la vara various interstitials ahh handle pandradhu yepdi na konjam sollunga anna .. naa automation selenium kku pudhusu..please anna.
@vijaymanda1020
@vijaymanda1020 3 года назад
HI, I am getting "Element Click Intercepted Exception" at 'submit' button despite giving correct xpath, css (used chropath too) and Thread.Sleep. Help me on this.
@educorner5236
@educorner5236 2 года назад
Hi Arul, WebDriver ah argument ah pass pandradhuku alternate ah namba extends class use pannikalama?
@LearnAutomationOnline
@LearnAutomationOnline 2 года назад
Yeah. It’s your wish
@educorner5236
@educorner5236 2 года назад
Actually I really want to say a big thanks to you,because I'm from non IT background,with the help of watching your RU-vid tutorials from scratch, now I have joined in well reputed IT company as a automation test engineer.
@LearnAutomationOnline
@LearnAutomationOnline 2 года назад
Wow. That's amazing. Are u a fresher or have worked on non IT field and got into IT? Either way, could you please drop me an email arulprasath36@gmail.com. I have few questions to ask!
@sasi11889
@sasi11889 5 лет назад
Sir please explain about extend reports step by step
@chandrasekarm1141
@chandrasekarm1141 3 года назад
Sir,how to use varargs in pom ,without taking as object[][], epdi varargs use pandradhu
@ganeshprasadd8418
@ganeshprasadd8418 4 года назад
Hi Sir,,, your explanation and videos to all topics are great and i learnt new things a lot... Aft POM Part 3 you mentioned to do one project containing all the concepts kindly can you do asap coz aft POM and data driven frame work we dont know which step to take it forward. And also in orange hrm home page after login contains few drop down button and its tough vthr to define them under @TestBy annotation or how to define them in POM... Please can you do project video on orange HRM it will be very useful to us...
@LearnAutomationOnline
@LearnAutomationOnline 4 года назад
Hi Ganesh, right now I'm in middle of so many personal things. Eh h is why I'm not posting any videos. Will try to post the requested topic in future.
@ganeshprasadd8418
@ganeshprasadd8418 4 года назад
@@LearnAutomationOnline Take care sir, but dont forget about us also :(... we ll waiting for full project plz do make it when u get time off from your personal work... desperately waiting...
@hashirhasmy1042
@hashirhasmy1042 2 года назад
Is it ok to use By class to findout the element without use findBy annotation
@vungaliloruvan3502
@vungaliloruvan3502 3 года назад
Please explain the selenium with c# sir
@sakthisakthi-wu4dt
@sakthisakthi-wu4dt 4 года назад
Please create video real time Sikuli automation testing project with excel integration for Maven project structure ,In my project we can not identify xpath in windows based application .
@DharaniSaroram
@DharaniSaroram Год назад
Hi Bro, When we call static method in another class, we need to create object for it. But we called here directly. Correct me If I am wrong bro.
@venkat4644
@venkat4644 Год назад
Hi bro i have one doubt intha framework ka naga epudi solrathu selenium page object model framework or POM NU solratha pom nu sonna maven la vara pom.xml ithu rendum same ah illa different ah plz solunga
@LearnAutomationOnline
@LearnAutomationOnline Год назад
Pom.xml is different from page object model or POM pattern.
@sangamithrap6775
@sangamithrap6775 10 месяцев назад
you did not run the code and shown how it runs after giving the pom
@princip533
@princip533 Год назад
Arul ... You taught this 4 years ago . May i go through this video for learning.. or may i follow any recent video of others for POM . Can you please guide
@LearnAutomationOnline
@LearnAutomationOnline Год назад
Except the changes made to selenium, rest of the concepts remain the same, you can learn through this
@princip533
@princip533 Год назад
@@LearnAutomationOnline POM ku 2 videos tha iruka... Ila vera ethana iruka arul
@LearnAutomationOnline
@LearnAutomationOnline Год назад
If you check the Playlist tab, I would have added all the videos under that category as a Playlist.
@tamilvanan7588
@tamilvanan7588 2 года назад
Hi sir,
@meianbesh6072
@meianbesh6072 2 года назад
Bro I have one doubt if we going to select the drop and down value in example (location )how to write the code and which class I keep that
@meianbesh6072
@meianbesh6072 2 года назад
POM class or testcase class
@sureshb666
@sureshb666 4 года назад
Bro 19.00 to 21.00 confuse pls how to reduce code in segricate find elements. Another update profile object class code write every time change properties change
@LearnAutomationOnline
@LearnAutomationOnline 4 года назад
Enaku ena sola varinganu purila.
@subscribee5152
@subscribee5152 2 года назад
Anna appium therunja vedio podunga anna
@mohamedarshad4298
@mohamedarshad4298 2 года назад
hey bro actually captacha is there u have missed but i have included in my code and .click() method i have used but its not working. what should i do.
@LearnAutomationOnline
@LearnAutomationOnline 2 года назад
Captcha shouldn't be handled via selenium code.
@dharuspanishcoach
@dharuspanishcoach Год назад
WebDriver-ன்றது interface தான? அப்புறம் ஏன் அதத் தேர்ந்தெடுக்காம import-அத் தேர்ந்தெடுத்தீங்க? (25-ஆவது நிமிசத்துல)
@ReyRhy
@ReyRhy 3 года назад
Bro, base class videos
@kadhaikalamvaanga9824
@kadhaikalamvaanga9824 2 года назад
bro full uh scroll agi update profile button click agala bro help me..
@TheMadhiarasan
@TheMadhiarasan 5 лет назад
Hi bro.I have one ques. U said like POM will be used when given attribute changed.Fr ex initially name attribute contains value as username. So I find the element with name as username. After tha name attribute value got changed. So in Loginpageobjects also I will the same one. If I used the same means it wont find ryt.. Hope u understand. Can u pls help me
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
Yes no matter whatever the design approach we will choose, if the page objects change, we have to modify them atleast once. But the point is if you have used the name attribute, 10 times directly in the code. And if the page object changes, we have to modify on ten places. With pom, we can simply change it on one place and it will be reflected everywhere. Hope this answers your question. If not pls let me know.
@TheMadhiarasan
@TheMadhiarasan 5 лет назад
Thank u bro.got it.
@sasi11889
@sasi11889 5 лет назад
Can u please post some programs and their explanation for selenium testers in interview point of view
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
Will do it in future.
@karthikeyansugumar20
@karthikeyansugumar20 5 лет назад
Not gettin exactly what you are sayin that 19.20 - The one which you explain for the number of lines reduced.
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
you don't have page object model and you have to write the login scenario for ten test cases. How will you do? Find element sendkeys for username and password, then login button click. You have to write for ten test cases. With page object model, you are simply Calling the username and password and login button wherever you want. Instead of writing it again and again. And this saves the number of code
@hayatbasha404
@hayatbasha404 4 года назад
Hi Anna , First operation is done But during second one I'm getting the error "unable to locate element" while clicking my profile
@LearnAutomationOnline
@LearnAutomationOnline 4 года назад
Are you getting no such element exception? In that case pls add thread sleep method for 10 seconds and see if it works. If it's working then u have to add proper wait statements. Even after adding the sleep if u get exception them the locator u used is wrong.
@herrlich9230
@herrlich9230 4 года назад
23:15 I'm not understanding bro..y r u again performing logging actions..so we can delete logintestcase class right?only one class is enough to do both logging and updating profile functions right?sry if my doubt is silly
@herrlich9230
@herrlich9230 4 года назад
Kindly explain it bro?
@LearnAutomationOnline
@LearnAutomationOnline 4 года назад
My test cases XML would have consisted of multiple test cases. Don't bother about that. Focus on page object model alone. Forget the rest in this video
@sureshsubramaniyan3201
@sureshsubramaniyan3201 5 лет назад
Please see my suggestion and add this suggestion in your video if have time. We can use a constructor to initialize the web driver. (the driver will act as webdriver an inside constructor ) Have Class Name = LoginPage and Test case as LoginTestCase.If initialize driver in LoginTestCase same will be initialized in LoginPage also when we are using same variable name for local and global Ex: Class Name = LoginPage Public class LoginPage { Webdriver driver; Public LoginPage(Webdriver driver){ this.driver = driver } } Note: If add my suggession in your code .so, able to understand easily.
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
I completely agree Suresh, at that time, i didn't want to introduce any java related concepts. My aim was to ensure audience, even of you are not familiar with java, you can master test automation. 😊. So only have not introduced anything related to java. Thanks a lot for your suggestions. Once all the must have series is done, will.cover design patterns. While doing so, again will revisit everything, by that time it will be covered. Thanks again
@sureshsubramaniyan3201
@sureshsubramaniyan3201 5 лет назад
@@LearnAutomationOnline Thank you very much for your reply
@vinothkv25
@vinothkv25 3 года назад
I too felt the same.. because it was asked in one of the interviews..
@yazhinih127
@yazhinih127 5 лет назад
Oru package la irunthu innoru package la antha class use panna nama extends keyword kuduka venama??
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
You can simply import that class and use. If you want the property to be inherited, you can use extends.
@ignasiousjegan6230
@ignasiousjegan6230 2 года назад
Hi arul, the practising website is now changed can you give any other website similar to it.?
@LearnAutomationOnline
@LearnAutomationOnline 2 года назад
Simply search selenium demo websites. You will get plenty of dummy applications
@ignasiousjegan6230
@ignasiousjegan6230 2 года назад
@@LearnAutomationOnline oh! ok tan q bro.
@herrlich9230
@herrlich9230 4 года назад
Logging action is fine but updating is not happening bro..pls explain.. My profile is not clicking
@LearnAutomationOnline
@LearnAutomationOnline 4 года назад
What exception are you getting
@sarthajbegum67
@sarthajbegum67 5 лет назад
Hi Arul, When we click on 'Submit' button, we are getting cookie pop up. How to handle the same in our code? Can you please explain.
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
You can use chrome options for this. Disable notification. Search this term. Chrome options disable notification.
@dineshroger1535
@dineshroger1535 2 года назад
Bro kings landing - GOT paathingala 😂😂👌
@LearnAutomationOnline
@LearnAutomationOnline 2 года назад
GOT paakama epdi...😅
@muthukkumars4338
@muthukkumars4338 5 лет назад
hi ji, can you pls update Hybrid framwork ?
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
Actually Hybrid framework is a hype created by interviewers and other blogs. It's a combination of keyword driven, page object and other types. For a single UI project, we should never choose, keyword driven approach. Keyword driven is not practically good and a time consuming one. For any UI application, page object model is the one we should be using. That's why I didn't create videos on hybrid. In future will try to post.
@Introvert_Explorer791
@Introvert_Explorer791 2 года назад
bro what is pom? interview keta solratuku shrt ha solunga bro simple ha
@LearnAutomationOnline
@LearnAutomationOnline 2 года назад
Page object model. To easily maintain the elements of the different page, u r going to keep separate classes for separate pages as part of your framework
@vijiviji-jq4wr
@vijiviji-jq4wr 5 лет назад
Rather than writing code for login in update profile class.. Can we call loginTestcase class
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
That also can be done. There's no proper or strict definition that it has to be done like this. It's upto the developer. Provided he or she doesn't make multiple redundant chunk of code.
@vijayraghav12
@vijayraghav12 5 лет назад
Sir, All selenium learning videos in all learning website(95%) having login function. I am 100 % ok with login function in pom, testing and cucumber but I know only login function. Could you please help me for inside website function with BVA test case. Thank you.
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
Bva? U mean bdd? Good that you are hundred percent confident with login function. The demo sites and tutorials may show any other functionality but will that help you in actual work. It's a huge question mark. Because whatever you see on tutorials is just for understanding the concepts. End of the day you have to try hands-on with other stuff. And if you face any issues while implementation, you have to seek help from Google or other resources. This is how you can learn faster. Try to implement any scenario, from orange HRM site . Suppose you are stuck with anything. Let me know wil help you.
@LearnAutomationOnline
@LearnAutomationOnline 5 лет назад
Also, this is just a first video I think. I would have added few more functions other than login in these pom tutorials. Watch them completely.
@vijayraghav12
@vijayraghav12 5 лет назад
BVA - boundary value analysis test case ready panni and converted to testng @test annotation oru date or train registration destination panna very useful irrukum, Thanks for your help sir.
@karthikdon6076
@karthikdon6076 3 года назад
Why bro u r giving first public static void then change to webelement
@LearnAutomationOnline
@LearnAutomationOnline 3 года назад
If u watch selenium playlist or java return type, u will get to know
@karthickkarthick5402
@karthickkarthick5402 Год назад
Sir website not work any website can u suggest me
@mohammedmafaz5538
@mohammedmafaz5538 Год назад
Yes, me also facing the same issue 😥
@alagudurai539
@alagudurai539 4 года назад
How to overcome captcha through Automation testing?
@LearnAutomationOnline
@LearnAutomationOnline 4 года назад
The fact is you shouldn't. And you can't. Captcha is meant for distinguishing computers and humans apart. If a program could solve captcha, then it beats the purpose. Though with the modern day advancements like computer vision and other visual based libraries it can be done. Google lens is one such example.
@sabarinathnagaraj5139
@sabarinathnagaraj5139 3 года назад
Am i the only one who noted "Kings Landing" in SendKeys : >
@vigneshkumar1975
@vigneshkumar1975 3 года назад
Driver call panrathu page object call pannrathu.
@vigneshkumar1975
@vigneshkumar1975 3 года назад
Dought
@ganeshprasadd8418
@ganeshprasadd8418 4 года назад
Sir presently you mentioned practice website has changed in functionality - www.phptravels.net/login. Even Login Button xpath not able identify. Please can you guide me.
@LearnAutomationOnline
@LearnAutomationOnline 4 года назад
UI change is inevitable in today's world. You can easily copy the xpath from the browser itself. Else please refer to my xpath tutorial so that it will be easier for you to write xpath on your own. Even for a complex element.
@karthikdon6076
@karthikdon6076 3 года назад
Anne driver driver soldrigale bus drivera illa taxi drivara....😜😜😜😜... Just for fun no offense 😜😜😜😜😜😜😜😜
@LearnAutomationOnline
@LearnAutomationOnline 3 года назад
Urulai kilangu lorry driver. 😜😜😜
@tamilvanan7588
@tamilvanan7588 2 года назад
ungala meet pannanum sir address solunga sir please
@LearnAutomationOnline
@LearnAutomationOnline 2 года назад
Address ah ? Ena pa straight public forum la address lam kekringa! 😳. Anyways I'm not living in India. Sorry. You can ask any doubts in comment or if you have some personal questions this is my email arulprasath36@gmail.com
Далее
Page Object Model & Log4J
1:11:37
Просмотров 196 тыс.