Selenium Frameworks | POM | PART - 2 | Page Factory | Page Object Model | Sample Implementation

  Рет қаралды 45,673

Learn Automation Online

Learn Automation Online

Күн бұрын

In the previous video, we understood the concept of Page Object Model and its significance. In this video, we will implement the page object model with the help of Page Factory. "Factory" is one of the design patterns of Java. Selenium has used one of the famous design patterns called Factory design pattern and that is called Page Factory. Page Factory is the best and most suited approach for implementing the Page Object Model.
What will we learn in this video:
1. What is Page Factory?
2. @FindBy annotation
3. Init elements function of Page Factory.
#Selenium #PageFactory #PageObjectModel #Java #LearnAutomationOnline
Best way to reach me (replies will be faster): KZbin comment section
Also, you can follow me on Facebook and Instagram.
Facebook: bit.ly/2TqPlis
Instagram: bit.ly/2Ez36rH

Пікірлер: 88
@jandiva3907
@jandiva3907 2 жыл бұрын
Sir... No words to say my happiness.. Evlo interview attend panirkan ithuvara... Ana edumae kedaikala... But after watching your videos I got selected in good company with more than 100 % package.. Enak baby iruku 3 months la so I'm not able to do hands on.. I got time only on mid nights I sacrificed my sleep for last 3 month and watched your videos on night.. Your videos gave me confidence... I learned selenium 3 times ana amount dan wasted. . Ungala mari oru guru kedaikahtha nu many times pray panirkan... Life long I will never forget you... You are my guru... Thank you so much sir... 😊🙏🙏🙏manual tester ah vae 8 yes odi poiruchi.. Ipo dan automation ku chance kedachirku.. Enalayum pana mudiyum nu confidence kedachirku... Ithellam ungala la mattum dan arul.. Kadavul arul ah la in the arul enak guru va kedacharu🙏🙏🙏thank you so much..
@LearnAutomationOnline
@LearnAutomationOnline 2 жыл бұрын
That’s so awesome to hear. Could you please drop me a message on instagram im_arulprasath . I would like to interview you, your journey may help someone in similar situation. Thanks in advance
@vasanthirusappan7320
@vasanthirusappan7320 2 жыл бұрын
I am preparing for interviews your videos really helping me.Super explanation thank you sir.. keep going 😊
@akonsathya
@akonsathya 4 жыл бұрын
Thanks a lot, learnt POM very easily
@sakthisakthi-wu4dt
@sakthisakthi-wu4dt 4 жыл бұрын
Without understanding long time used for pagefactory in my project long time ,Now only understand why we used pagefactory and webdriver and your 300 years cooking story also really good ....
@ferozkhanr6653
@ferozkhanr6653 2 жыл бұрын
i referred so many sites, This is the one easily understandable step by step
@manikandank3867
@manikandank3867 Жыл бұрын
Hi bro, after a long time, I can under this POM concept. Your explanation is crystal clear. Thank you🙏
@sabareeshjr9542
@sabareeshjr9542 2 жыл бұрын
Thank u sir.. Ur videos are helping me.
@iambadcat0397
@iambadcat0397 3 жыл бұрын
Superb Arul.Very Useful.Confidence is getting increased while watching your each and every part of Selenium Videos.God belss you
@LearnAutomationOnline
@LearnAutomationOnline 3 жыл бұрын
Keep learning. Glad to hear
@dineshbabu3938
@dineshbabu3938 4 жыл бұрын
Sir, I am seeing you as Durga Sir(for JAVA). Thanks. BTW sorry for comparison.
@LearnAutomationOnline
@LearnAutomationOnline 4 жыл бұрын
Durga sir 😱!!!! He is such a legend and my greatest inspiration on how a teacher should be. Thanks for the compliment.
@maheshbabu637
@maheshbabu637 2 жыл бұрын
Vera Mari Vera mari arul bro... really I'm happy and excited while seeing the output on my project by following u r videos..,thnks a lot😍😍😍u r great a teacher...keep rocking bro..I'm sharing these videos to my friends too...
@LearnAutomationOnline
@LearnAutomationOnline 2 жыл бұрын
:) When they are stuck, help them rectify the issues, clarify their doubts and ask them to do the same when they become proficient! All the best!
@maheshbabu637
@maheshbabu637 2 жыл бұрын
@@LearnAutomationOnline sure sure bro👍
@asmrvideosforrelaxing6962
@asmrvideosforrelaxing6962 3 жыл бұрын
hi sir the explanation is very clear how to excute different classes in TestNG in different packages
@mariajeniffer2333
@mariajeniffer2333 3 жыл бұрын
Very well explained Arul..Each video I'm commenting since avalo good ur teaching is ...Stay blessed
@indiantourism975
@indiantourism975 3 жыл бұрын
Excellent Sir.... I learned very easily..
@sakthisakthi-wu4dt
@sakthisakthi-wu4dt 4 жыл бұрын
Excellent video and explanation
@lavanyakarthikeyan7393
@lavanyakarthikeyan7393 4 жыл бұрын
Really u r awsm ... Cristal clear explanation....
@mokkachannal6109
@mokkachannal6109 Жыл бұрын
Thank you bro... thank you so much ....🥰🤗
@sakthivel-de9gz
@sakthivel-de9gz 5 ай бұрын
Hi Arul Sir, One question - when using POM , we are calling method using static from page object class to testcase class and performing action on the webelement .my question is where and how to use TestNG in real time? Please reply
@ajaya9541
@ajaya9541 3 жыл бұрын
Verra level bro it's very useful it's all worth for paid content!!!!
@kirthikarajendran7627
@kirthikarajendran7627 4 жыл бұрын
Hi sir, I have one question which asked in my interview I have 4 year’s experience in manual but I mentioned in the resume like I worked in both manual and automation. So as in one of the interview question I was asked like how will you provide estimation for both manual and automation in your current sprint to achieve your automation regression suite is ready?
@priyaraj2766
@priyaraj2766 2 жыл бұрын
Hi Sir. Can you explain how to relate/apply Data Driven framework in POM?
@growmore2458
@growmore2458 Жыл бұрын
How do perform for drop-down using pom sir ? Normally In select class we pass the webelement In pom how sir ?
@mariajeniffer2333
@mariajeniffer2333 3 жыл бұрын
I'm not sure how to work with drop-down using findby.. using select and normal using driver and findelement I know to select drop-down values...my doubt is how to given in @Findby.Pls assist me
@LearnAutomationOnline
@LearnAutomationOnline 3 жыл бұрын
@FindBy(id="ddCompany") private WebElement select; Select dropdown = new Select(select); dropdown.getOptions().get(1).click();
@LearnAutomationOnline
@LearnAutomationOnline 3 жыл бұрын
Something like this should work
@mariajeniffer2333
@mariajeniffer2333 3 жыл бұрын
@@LearnAutomationOnline tanks a lot will try
@priyadharshiniprabhakaran1298
@priyadharshiniprabhakaran1298 3 жыл бұрын
Thanks a lot sir
@growmore2458
@growmore2458 2 жыл бұрын
Tq sir
@prabakarm5025
@prabakarm5025 4 жыл бұрын
Theivame super
@karthickm6862
@karthickm6862 2 жыл бұрын
Bro Your voice is nice to hear
@karthikeyansugumar20
@karthikeyansugumar20 5 жыл бұрын
In earlier video, we used return (Changed void to webelement & it threw an error then we added return) in LoginPageObjects & UpdatePageObjects in order to use sendkeys in LoginTestCase & UpdateProfile. Here without usin return we are able to use sendkeys. How is it possible here?
@LearnAutomationOnline
@LearnAutomationOnline 5 жыл бұрын
Using find by annotations, we have found the webelement and it has been stored into the variable called username. Watch the video again. Previously we used a method called userName, to find and return the element. Now we removed that and findby annotations will do th job. The value will be stored in the variable. And we are simply using the variable to sendkeys. Incase of method only we need to return
@karthikeyansugumar20
@karthikeyansugumar20 5 жыл бұрын
@@LearnAutomationOnlineIn earlier video we used a method so we have to send that webelement usin return. If we use findby annotation we don't require to send it as we store it in a variable. The webelement will be send by findby annotation. Is my understandin correct?
@LearnAutomationOnline
@LearnAutomationOnline 5 жыл бұрын
Findby annotations is just doing the work of driber.findelement method. We will store that in a webelement. Similarly the findby annotation will store the webelement in the variable available beneath the annotation. In the actual test case, we are using the variable where we have stored the webelement
@Niceboy7245
@Niceboy7245 Жыл бұрын
Sir (this,search context is null) nullpoint exception adikuthu yanna pannurathu cucumber la
@vengadeshwaran6188
@vengadeshwaran6188 2 жыл бұрын
Hi sir , can u tell me please how to write a method for dropdown in pom concept
@karthikkeyan2017
@karthikkeyan2017 4 жыл бұрын
If we use findby annotation then how could we use explicit wait for a webelement as it needs webdriver
@shabnupuvanendran3533
@shabnupuvanendran3533 4 жыл бұрын
Hi, We used to maintain the locators(for a page) in separate class and webelements in a separate class... Then we would return the values using webelements like, return driver.find element(Locators.uname); /* locators: class name to store locators, uname: just a sample variable */ In this case how to use @findBy Please advise!!!
@rajkumarm25
@rajkumarm25 Жыл бұрын
@FindBy(name="password") public static WebElement password; Is this method or variable?
@vijayvijay-oq8ew
@vijayvijay-oq8ew 4 жыл бұрын
@findby will do the job wat return does in the previous video. Right bro?
@LearnAutomationOnline
@LearnAutomationOnline 4 жыл бұрын
This annotation wil find the web element and store it in the variable that we have given below
@vijayvijay-oq8ew
@vijayvijay-oq8ew 4 жыл бұрын
@@LearnAutomationOnline only when the WebElement is returned to the test cases the actions can be performed right.. My question is how the stored WebElement is returned to the test cases..pls explain bro
@ganeshmynampati1607
@ganeshmynampati1607 5 жыл бұрын
Hi Arul can you let us know where we are using 'Method Overriding' concept in Selenium webdriver in realtime?
@LearnAutomationOnline
@LearnAutomationOnline 5 жыл бұрын
WebDriver is an interface, which means it's having only specifications. Chrome driver, gecko driver, and other drivers have overridden it right? This is overriding example we can say in selenium. Overloading, for example, implicit wait method can wait for seconds, minutes and so on. This is overloading.
@ganeshmynampati1607
@ganeshmynampati1607 5 жыл бұрын
@@LearnAutomationOnline I told the same answer exactly but interviewers are expecting some other example.
@LearnAutomationOnline
@LearnAutomationOnline 5 жыл бұрын
😂. Vera enna expect panranga. Hmm??? Actually all the WebDriver implementations are examples of overriding. Ithukum Mela enna iruku. Will research and tell Ganesh.
@LearnAutomationOnline
@LearnAutomationOnline 5 жыл бұрын
Have seen your comment, related to covariant return type. Couldn't find that one. Hence replying here. one of the less popular feature implemented in 1.5 version. As per method overriding definition, return types has to be same. But after 1.5, it can be a covariant type. But still it's not popular. a child class can use sub return types of parent class. If the return type is primitive like of int, float, char. We can't use this. This was mainly introduced to reduce type casting problems.
@hayatbasha404
@hayatbasha404 4 жыл бұрын
Hi Anna, I have a doubt, is it possible to integrate data driven Framework with page object model. I mean getting the data from Excel sheet and using it in page factory.
@thirupathythiru3883
@thirupathythiru3883 2 жыл бұрын
Super bro
@dhivyaakumar
@dhivyaakumar 4 жыл бұрын
Hi sir... I tried this out but getting stale element exception error while checking brand chckboxes in amazon. Here I'm trying to click at least two check boxesby getting the web elements in a list, iterating over for loop and then clicking on the webelement. How to rectify this sir?
@kadhaikalamvaanga9824
@kadhaikalamvaanga9824 2 жыл бұрын
bro,Page object model part 1 i used javascript executor for update profile, in this video i can't use that.. now element is not clickable error shows help me bro
@chandrasekarm1141
@chandrasekarm1141 3 жыл бұрын
sir,static ilama epsi pananum any concepts iruka like constructor la use pandra maadhiri
@priyasvlog3520
@priyasvlog3520 2 жыл бұрын
Off line class eapdi sir attend panndrathu
@LearnAutomationOnline
@LearnAutomationOnline 2 жыл бұрын
I'm not taking offline classes
@suryaprakash4237
@suryaprakash4237 5 жыл бұрын
org.openqa.selenium.ElementClickInterceptedException am getting this exception bro!!
@LearnAutomationOnline
@LearnAutomationOnline 5 жыл бұрын
On which line, can you please mention the duration of that in the video. Like this. 4:30. This will take me to the exact time of this video.
@suryaprakash4237
@suryaprakash4237 5 жыл бұрын
@@LearnAutomationOnline Bro before clicking login button ..a small cookie pop up has popped at the bottom of the window under that only the login button is available ...so I just maximised the window and hence the button got visible and clicked it bro
@sridevisuresh2554
@sridevisuresh2554 4 жыл бұрын
Hi Arul, when I came thru a post to learn about Page Factory, I jus' got to know about this @CacheLookup annotation. Is this really important in the interview point of view? And, do ppl use this in industry to avoid the stale element exception(in connection to your hyper links video)?
@LearnAutomationOnline
@LearnAutomationOnline 4 жыл бұрын
We can't decide if that's important or not from interview perspective, as it depends on the interviewers. But knowing that as a handling mechanism for stale element exception is worth. I haven't used it much, to be honest. When i come across stale element, in the catch block i will find that element alone and repeat the process
@sridevisuresh2554
@sridevisuresh2554 4 жыл бұрын
Oh Okay. Thanks Arul :)
@sakthisakthi-wu4dt
@sakthisakthi-wu4dt 4 жыл бұрын
Please share GitRepository link to refer your video code
@vijayanand5005
@vijayanand5005 4 жыл бұрын
Hi Bro one doubt, can we tell in interview that I did data driven framework with test NG concepts to the interview person? Or will he expect more like hybrid framework?
@LearnAutomationOnline
@LearnAutomationOnline 4 жыл бұрын
Data driven alone he won't accept. Data driven is just a portion of an application. I mean where you test a single functionality of an application with different set of data. Say something like page object model.
@vijayanand5005
@vijayanand5005 4 жыл бұрын
@@LearnAutomationOnline sure Bro, thank you for the reply :) ☺
@sathishappu2623
@sathishappu2623 4 жыл бұрын
What is the code to scroll down or scroll up the webpage sir???
@LearnAutomationOnline
@LearnAutomationOnline 4 жыл бұрын
kzbin.info/www/bejne/iGS2qaKVnpWYaLs refer this video
@vinothpriyan1260
@vinothpriyan1260 3 жыл бұрын
Real time project page factory method 80% companny use pnnviga sonniga , base class use pannuvoma ( base class eppdi bro use pandrathu) both pom + base class real time project use pannuvoma kojam eppdinu solluga bro pls
@LearnAutomationOnline
@LearnAutomationOnline 3 жыл бұрын
Base class nu etha mean panringa, inside base class what will be there according to ur understanding
@vinothpriyan1260
@vinothpriyan1260 3 жыл бұрын
(Multiple time functions use pandrapo) Base class (parent cls) public void input values (webelment element, string value) { element. Sendkeys(value) } ........................................................................ Child class name ( login) using extend keyword (parent class) Webelement email = driver. Findelement(By.id("email")); Input values(email, "username); } •Sendkeys use pandra place la inputvalues use pannuvom •Driver method and obj methods totaly 31 methods irruku la bro eppdi yellam methods base class creat pannuvom sonnaga •So kojam doubt irruku videos irruka
@vinothpriyan1260
@vinothpriyan1260 3 жыл бұрын
TestNg , data driven doubts kettu irrutha clear panniga fully unnderstand bro but base cls create doubts bro pls kojam solluga
@arunragavan442
@arunragavan442 4 жыл бұрын
sir, it works only in TestNG ah???
@LearnAutomationOnline
@LearnAutomationOnline 4 жыл бұрын
Selenium has no dependency with TestNG. Page factory is a selenium concept.
@arunragavan442
@arunragavan442 4 жыл бұрын
@@LearnAutomationOnline sir, as a fresher in interview they ask pom qns????
@karthikeyansugumar20
@karthikeyansugumar20 5 жыл бұрын
The code is workin fine. But I have a strange issue. When i execute the code for the 1st time, city name is gettin populated once. If i run for the 2nd time city is gettin populated twice. Like wise it gets increased. What is causing this?
@yazhinih127
@yazhinih127 5 жыл бұрын
Bro I too have this doubt... So as per this code public static webelement username is variable right???
@madrasiboys4123
@madrasiboys4123 2 жыл бұрын
Hi bro I have a doubt how can I contact u on my framework
@LearnAutomationOnline
@LearnAutomationOnline 2 жыл бұрын
Through comments or email arulprasath36@gmail.com
Incredible: Teacher builds airplane to teach kids behavior! #shorts
00:32
Fabiosa Stories
Рет қаралды 12 МЛН
Un coup venu de l’espace 😂😂😂
00:19
Nicocapone
Рет қаралды 5 МЛН
Explain OOPS Concepts in Selenium Automation Framework
20:04
RD Automation Learning
Рет қаралды 25 М.
Page Object Model #1 | Selenium தமிழ் | Selenium Tamil Tutorial
9:55
Selenium Cucumber BDD Framework with Java and TestNG - Page Object Model | POM
24:59
SDET Adda For QA Automation
Рет қаралды 9 М.
#11 - Writing Page Object Model code for Selenium with C# .NET
12:32
Execute Automation
Рет қаралды 6 М.
Page Object Model in Playwright
29:17
CommitQuality
Рет қаралды 24 М.
How To Explain Test Automation Framework In Interviews For Selenium
13:42