Page Object Model in Framework-How to Create Test Case in Framework using POM

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 120

  • @bhanuduttojha771
    @bhanuduttojha771 3 роки тому +2

    You are awesome Mukesh. Superb explaining. I am really understanding how oops concept getting utilized in automation framework

  • @manishdubey3603
    @manishdubey3603 3 роки тому +1

    One of the Best POM explaination brother You're Great..👍👍👍

  • @abhishekkishore3087
    @abhishekkishore3087 5 років тому +3

    Thanks Mukesh for uploading such an informative, useful n easy to understand video. I used to follow ur POM videos, But later switched to Naveen Autolabs Video series. But u have come up with so lovely concept.. Thankful to you for imparting so much knowledge. I am a fan of ur teaching skills.. Abhishek

    • @Mukeshotwani
      @Mukeshotwani  5 років тому +1

      Thank you so much Abhishek, I will also publish series 2 on framework soon.

  • @JamalAhmad-t6y
    @JamalAhmad-t6y 7 місяців тому +1

    Hats of for such an amazing content. Better then many of paid courses.

  • @tonnyv2354
    @tonnyv2354 5 років тому +1

    Hats off Mukesh ,thank you for Video ,Waiting More on Hybrid Framework .My friend lajish lakshman i think he is too lucky to work with you

  • @adrianvic9078
    @adrianvic9078 5 років тому

    Mukesh, thanks for uploading these videos. One thing I noticed is that the Browser factory part and few other parts are blurred is not clearly visible. I dont know if others has experienced the same blurred video. If possible please rectify the video blurr. Thanks

  • @pankajkoriya4078
    @pankajkoriya4078 4 роки тому +2

    Hey Mukesh,
    First of all I would like to thank you for your video tutorials.
    My question is, Could you please tell me where we can store all test data like username, password, url, driver location path etc.

    • @Mukeshotwani
      @Mukeshotwani  4 роки тому +1

      Hi Pankaj, in these series I have covered everything, please check ua-cam.com/play/PL6flErFppaj0WwNOMFeXPVlNCDuJyPYFi.html

    • @pankajkoriya4078
      @pankajkoriya4078 4 роки тому

      Thank you mukesh for your quick response.
      I have gone through video series from the link provided by you and I got complete idea about where to store all test data.
      Thanks you once again for your help !!

  • @smitas7137
    @smitas7137 5 років тому +2

    well explained Mukesh. Do we need to initialize the driver for each page?

    • @Mukeshotwani
      @Mukeshotwani  5 років тому

      Hi Smita, you can initialize in Base Class and you can use in every test case.

  • @madhuripavani8902
    @madhuripavani8902 3 роки тому +1

    Hi Mukesh very informative, if we want to initialize multiple pages in multiple tests how do we do this everyone is explaining only the basics, please help with this topic

    • @Mukeshotwani
      @Mukeshotwani  3 роки тому

      Thank you Madhuri, yes part 2 of this hybrid framework is coming soon in Jan where I will make multiple test example and will run the same.

  • @manishkuwar6787
    @manishkuwar6787 2 роки тому +1

    Hi Mulkesh , thanks for this Nice explanation video...I am having one query here - Why you have not created utilities in src/main/java..means does it make any difference or remain the same

    • @Mukeshotwani
      @Mukeshotwani  2 роки тому

      Hi Manish, you can keep utility in src/main/java too but main part is test which has to be in src/test/java

  • @akshayjain810
    @akshayjain810 4 роки тому +1

    Thanks Mukesh for explaining the POM design pattern while creating the framework so well.
    However, I did not understand the part at 19:35 sec when you talk about PageFactory class which has the static method called initElements and returns the object of the class whichever we want to use. Would be of great help, if you could refer me to the video where this part of code is explained where returning the page object/page chaining is used. Thanks!!

    • @Mukeshotwani
      @Mukeshotwani  4 роки тому +1

      HI Akshay, I have 2 more videos which covers POM without framework which might help ua-cam.com/video/w_iPCT1ETO4/v-deo.html

  • @prabodhghosh662
    @prabodhghosh662 5 років тому +4

    Hi @Mukesh, can you give us an example of a test case which requires interaction with Webelements of multiple pages?
    For example - if I want to design a test case to create a new Product (Product tab on left panel>New Product); I need to interact with Sign In page, Home Page and Create New Product page. So what is the best practice to achieve this? Please advise.

    • @Mukeshotwani
      @Mukeshotwani  5 років тому +1

      Hi Prabodh, just like we have create login page like that we need to create another pages and use them.
      Coming weekend I am going to upload the same.

  • @chetutonystark
    @chetutonystark Рік тому +1

    You're just great sir 😌😄🎉

  • @prafulanand6548
    @prafulanand6548 5 років тому +1

    good video ..only confusion is when to use @BeforeTest and @BeforeClass and similarly @AfterTest and @AfterClass

    • @Mukeshotwani
      @Mukeshotwani  5 років тому +1

      Hi Praful @beforeTest for when you have to run some scenario for every test suite and @beforeclass for alll classes

  • @Bell4Fun
    @Bell4Fun 5 років тому +1

    Please share the link for previous vdo and next vdo for this vdo ....thanks

  • @santooveluri7128
    @santooveluri7128 5 років тому +1

    Thanks alot for the video series and your time... my ques is can't we use WebDriverManager in our framework

  • @sauravmahata2401
    @sauravmahata2401 5 років тому +2

    u r too good ... mukhesh.. thanks a lot

    • @Mukeshotwani
      @Mukeshotwani  5 років тому

      Thanks Saurav for such a nice comment

  • @indrasenareddy6525
    @indrasenareddy6525 3 роки тому +1

    What exactly i want to know about POM ,That is in this video.Thank you so much

    • @Mukeshotwani
      @Mukeshotwani  3 роки тому

      Hey Indrasena, Thanks I am glad it helped you.

  • @theharshaankalgi
    @theharshaankalgi 4 роки тому +2

    Hi Mukesh!!! This cannot be easier than this. :3

  • @vinaymalvi2506
    @vinaymalvi2506 3 роки тому +1

    Thank you Sir... Really good explanation

  • @rajeshdevan6051
    @rajeshdevan6051 5 років тому +1

    Hi mukesh, could you please zoom your video for up coming videos because current videos visible is very tough to watch am getting eye pain so please try to zoom the videos hereafter. Thank you.

    • @Mukeshotwani
      @Mukeshotwani  5 років тому +1

      Thanks Rajesh for feedback.. noted your point

  • @ParagOak
    @ParagOak 5 років тому

    @Mukesh : If possible please add positive and negative TestCases with test data. Also if your using ExtentReports please use parent and child test cases with more than 1 TestCases.

  • @salmaakhter6359
    @salmaakhter6359 3 роки тому +1

    Hi Mukesh! This is so impressive, you always explained the most simple way, how can I get connected with you?

    • @Mukeshotwani
      @Mukeshotwani  3 роки тому

      Thank you Salma for such a nice comment. Feel free to connect mukeshotwani@learn-automation.com

  • @MakeLearingEasy
    @MakeLearingEasy 5 років тому

    Thanks for such nice explanation..Keep it up Mukesh.

  • @KishoreeKoli6
    @KishoreeKoli6 3 роки тому +1

    Thank you very much.

  • @kritikumari7048
    @kritikumari7048 2 роки тому

    @mukesh sir- thanku for this but please explain at 6:31 why do you have taken WebDriver driver in argument although program is running fine without taken it in argument please tell ,solve this query

  • @yuriymuzyka9741
    @yuriymuzyka9741 5 років тому

    Hi Mukesh, can we extend "BaseClass" from "LoginPage" instead of passing it from @Test ?
    If we'll have in our @Test steps from 10 pages we need to pass the driver 10 times.

  • @personalaccount7287
    @personalaccount7287 5 років тому +1

    Hi Mukesh is there any video in which you have checked all the validation messages step by step in sugnup process. If you have please share

    • @Mukeshotwani
      @Mukeshotwani  5 років тому

      Hi Mate, That I will cover in part 2

  • @mdhossain529
    @mdhossain529 4 роки тому +1

    Thank You very Much Sir.

  • @maheshjutti9347
    @maheshjutti9347 5 років тому

    Well explained, Mukesh!

  • @shailendrakumar3467
    @shailendrakumar3467 5 років тому

    Sir is it necessary to initialize page factory init method in every test case, Actually I am writing more test cases and I don't want to initialize page factory in each and every test cases

  • @abraham2961
    @abraham2961 5 років тому +2

    Awesome 👍

  • @abhishekkumarsingh5052
    @abhishekkumarsingh5052 5 років тому

    Hi mukesh,
    I have silly Quarry related to project dashboard UI changing based on users login .
    how i can automation such case because display data's are also different.
    please help to provide approach so that i can implement the same

  • @shanjaynithin2388
    @shanjaynithin2388 4 роки тому

    If we have to pass multiple parameters to a method what would be a good way to implement it?
    Eg: public void newUser(String firstName, String lastName, String gender, int age, int salary, int experience) {
    .............
    .............
    .............
    }
    Here the number of parameters passed to the method is huge and it will be difficult to keep note of the position of the parameters. Is there some good way to implement a method with multiple parameters?

  • @brindhabalakumar1761
    @brindhabalakumar1761 Рік тому

    Hello Sir,
    I was creating the fremwork as per ur instruction,
    i am stuck in one point where you execute the script , at 13.34 sec 'Run as > TestNG Test ' , but for me TestNG Test is not coming , instead i got only run configuration alone. could you please give your idea on this.

  • @snehalyadav5906
    @snehalyadav5906 3 роки тому

    Hi Mukesh..Can you please share code structure of this example?I am trying this example but getting Runtime & Null pointer exception.Can you please help me in this?

  • @AJITKUMAR-uu8nl
    @AJITKUMAR-uu8nl 4 роки тому +1

    Hello Mukesh Sir,
    when i try running LoginTestCRM i am gettng Null Pointer Exception i have followed the same steps which mentioned in this video. Can you tell me what will be the issue. Just to inform browser is getting launched but Username and Password is not getting entered. Thanks

    • @Mukeshotwani
      @Mukeshotwani  4 роки тому

      Hi Ajit, NullPointerException is pure Java exception. You can debug the code ua-cam.com/video/rXXeHfvbddo/v-deo.html

  • @blablagswjsvsns134
    @blablagswjsvsns134 5 років тому +1

    Sir protactor par b vedio Banao..

    • @Mukeshotwani
      @Mukeshotwani  5 років тому

      Yes Ashish iske bad banana start karunga

    • @blablagswjsvsns134
      @blablagswjsvsns134 5 років тому

      @@Mukeshotwani thanks alot sir..i have a scenario in. My application where I have to perform drag and drop by selecting multiple elements using control.. So I am using click And hold and releasing it to that point.but it only release the last element that I have clicked instead of multiple elements that I have selected.. How can I perform this scenario?

  • @hoagy_ytfc
    @hoagy_ytfc 5 років тому +1

    Towards the end of this video, where you extract out @BeforeClass and @AfterClass out into a base class - was there a mistake here? The base class is under *.pages while the superclass is under *.testcases - the base class should be under *.testcases too, right?
    Useful tutorial though :)

    • @Mukeshotwani
      @Mukeshotwani  5 років тому

      Hi David, You can keep base class in Pages or Test cases as well, the only change is code will be all variables will move to the public if baseclass in a different package.

  • @arunrajarathinam2471
    @arunrajarathinam2471 5 років тому

    sir can u pls respond this .i just run maven project but it running previous java program how to run current maven

  • @devikongara6998
    @devikongara6998 4 роки тому +1

    Hi mukesh, getting error like failed to get TestNG version from class.What could be the reason??Please help me

    • @Mukeshotwani
      @Mukeshotwani  4 роки тому

      Hi Devi please use 6.9.10 version.

  • @ioriyagami5322
    @ioriyagami5322 2 роки тому +1

    how to add different pages and different test pages. because it's only for a single item. and use the login page for only entering the site.

    • @Mukeshotwani
      @Mukeshotwani  2 роки тому

      Hi Lori, what is the issue here? You can follow exactly same approach for all the test.

  • @mamtachahal2566
    @mamtachahal2566 4 роки тому +1

    Hi @Mukesh i have tried implementing this but facing issue as below , i have created static startApplication and trying to access it via import statement. Could you please suggest something. I don't understand why we need main() there. Error: Main method not found in class com.automation.Utility.BrowserFactory, please define the main method as:
    public static void main(String[] args)
    or a JavaFX application class must extend javafx.application.Application

    • @Mukeshotwani
      @Mukeshotwani  4 роки тому

      Hi Mamta, please share code screenshot. Seems you are running BrowserFactory directory thats why it is asking for main method. You can run the test using testng.xml or pom or from main test cases.

  • @BiswajitBiswal
    @BiswajitBiswal 5 років тому +1

    Getting error---"Can inject only one of into a @AfterClass annotated browser".

    • @Mukeshotwani
      @Mukeshotwani  5 років тому

      Hi Biswajit, Can you share the code where you are getting this exception?

    • @BiswajitBiswal
      @BiswajitBiswal 5 років тому

      @@Mukeshotwani thnx for ur reply,..i fixed it

  • @hemangishelake9849
    @hemangishelake9849 4 роки тому +1

    The demo website is changed now. what I can do? please suggest

    • @Mukeshotwani
      @Mukeshotwani  4 роки тому +1

      Yes , you can use the same concept for any application. Just a few locators will change.

    • @sagarshrestha7418
      @sagarshrestha7418 3 роки тому

      @@Mukeshotwani so previously the interface was it showed login and password but now you have to login and then pass, then what changes i need to make in my login test java class

  • @sairajkale1405
    @sairajkale1405 4 роки тому

    Mukesh Sir..Could you plz help me out of one doubt..As we are creating an object of login page in LoginTest class..Then what is the need of constructor in LoginPage class as we are initialising the page objects through logintest class itself..And if we are going through your said approach ..How do constructor in Login page class getting called and how driver in same class getting initialized..Plz help

    • @sairajkale1405
      @sairajkale1405 4 роки тому +1

      Even if we are removing constructor from LoginPage class and we have only the default constructor then how driver is getting initialized in LoginPage class..If we remove the constructor then also data for username and password is getting passed into the fields..Plz help me out if anyone knows the fact

    • @Mukeshotwani
      @Mukeshotwani  4 роки тому +1

      Hi Sairaj, please watch my videos for clarification, I created dedicated videos for POMua-cam.com/video/w_iPCT1ETO4/v-deo.html

  • @22Shoyab
    @22Shoyab 5 років тому +1

    Sir still i didn't found the soln of how to find the text which is highlight/ selected text from dropdown list (bootstrap)

    • @Mukeshotwani
      @Mukeshotwani  5 років тому +1

      Shoyab share your code to my email let me check mukeshotwani@learn-automation.com

    • @22Shoyab
      @22Shoyab 5 років тому

      @@Mukeshotwani i have send you email please check from your end and let me know

  • @VARUNKUMAR-tx5qd
    @VARUNKUMAR-tx5qd 5 років тому

    Thank you sir

  • @khirodprusty3565
    @khirodprusty3565 5 років тому

    awesome..

  • @Rashmi_Chauhan
    @Rashmi_Chauhan 5 років тому +1

    Good

  • @TahirAkhlaq
    @TahirAkhlaq 5 років тому

    Sur where we use overriding in framework?

    • @Mukeshotwani
      @Mukeshotwani  5 років тому

      Going to cover all in framework.
      For quick reply-
      WebDriver Driver=new ChromeDriver() is itself method over ridding concept
      ua-cam.com/video/6Er5pIEiscI/v-deo.html

  • @NeoNeoza
    @NeoNeoza 5 років тому +1

    i convert to testng.xml when i run the test gets skipped. what could be the problem

    • @Mukeshotwani
      @Mukeshotwani  5 років тому +1

      Hi Neo, whenever test skipped or fails always check the report or exception log where you will find all details about the issue.

  • @Sourabhgole-trading
    @Sourabhgole-trading 3 роки тому

    hi, Mukesh while running Testcase, the URL is opening but the element is not hitting getting error like,
    FAILED: loginTest
    java.lang.NullPointerException: Cannot invoke "org.openqa.selenium.SearchContext.findElement(org.openqa.selenium.By)" because "this.searchContext" is null
    What should I do? How it will fix please help me.

  • @TheRealDeal878
    @TheRealDeal878 4 роки тому +1

    noticed that the driver is returning null after leaving test base classs, not sure what is the issue.

    • @Mukeshotwani
      @Mukeshotwani  4 роки тому +1

      Can you share the code?
      mukeshotwani@learn-automation.com

    • @TheRealDeal878
      @TheRealDeal878 4 роки тому

      @@Mukeshotwani what is yout github account, can share through there

  • @reshmapatil8785
    @reshmapatil8785 5 років тому +1

    What can we do if for logging in to an application I have a windows pop up rather than a application login page?

    • @Mukeshotwani
      @Mukeshotwani  5 років тому

      Hi Reshma in that case you have to switch to new window then perform operation.

  • @lijiprathapan8143
    @lijiprathapan8143 3 роки тому +1

    Hi Mukesh,When i move this to Base class ;im getting an error ;FAILED: loginApp
    java.lang.NullPointerException: Cannot invoke "org.openqa.selenium.SearchContext.findElement(org.openqa.selenium.By)" because "this.searchContext" is null; Can you please help me with this

    • @Mukeshotwani
      @Mukeshotwani  3 роки тому +1

      Hi Liji, you can share your code on github I will look into this.

    • @sakethardaha5965
      @sakethardaha5965 3 роки тому +1

      Hi Liji, please check if you are storing the driver variable which is returned by startapplication method .
      this line in the code
      driver = BroswerFactory.startApplication(driver,"chrome",appURL);

  • @venkateswararaobajuboina4072
    @venkateswararaobajuboina4072 5 років тому

    i want complete architecture of maven if u dont mine can you please help me

  • @abraham2961
    @abraham2961 5 років тому +1

    Sir please continue with this application and do add contact operation and verify it in list section and then do validation please I need it

    • @Mukeshotwani
      @Mukeshotwani  5 років тому +1

      Yes Rehan Bhai sure will try my best

    • @umangsharma7447
      @umangsharma7447 5 років тому

      @@Mukeshotwani - could you please add further videos in framework series... thanks a lot !! You're doing great job ..

  • @subhashreemaharana3420
    @subhashreemaharana3420 2 роки тому

    Hi Mukesh ..I am getting noclassdef found error

  • @shanugoyal2572
    @shanugoyal2572 5 років тому

    Sir how can I connect to you

  • @subhashreemaharana3420
    @subhashreemaharana3420 2 роки тому

    I was creating structure but then pom.xml file and project file got an error symbol without doing anything. How to solve that

  • @vamsithota8495
    @vamsithota8495 4 роки тому

    How to create that project ?

  • @athiras7238
    @athiras7238 3 роки тому +1

    Hi can i download this code from github

  • @TheBEDMAK
    @TheBEDMAK 3 роки тому +1

    4:10 screemer

  • @rishabhsaxena250
    @rishabhsaxena250 5 років тому +1

    Hello Mukesh Sir,
    I am getting "java.lang.NullPointerException
    " while running LoginTestCRM class.

    • @Mukeshotwani
      @Mukeshotwani  5 років тому +1

      Hi Risabh please extend base class in your testcase.

  • @masalapaul
    @masalapaul 5 років тому

    url has changed: use crmpro.com/index.html