Login

Lost your password?
Don't have an account? Sign Up

Page Object Model – Python Selenium with PyTest – Part 1

In this video, I have explained the design and how to create UI Automation Framework with PyTest using POM (Page Object Model) design pattern.

Technologies used:
Python 3.x
Selenium WebDriver Python Language binding
PyTest – test framework
Pytest – html report
Pytest-xsld for parallel execution
PyCharm – IDE

https://www.educational.guru

23 comments

  1. Prabhu Mishra

    Hi sir, could you please make a video on how to create a function in python to select dependant drop down values. For example select a drop down value, then based on the selection another drop down appears with values. All the dependant drop down should have same xpath but should only differ in it’s preceding value.

  2. Mandeep Arora

    Hi could you prepare a video regarding how to automate when we have to perform drag and drop on slider which does not have any value in its properties. But we want to perform drag and drop using some defined values

  3. Manikanta Reddy

    Hi Naveen,
    I’m new to automation and have a doubt.. Having Utility class is good or bad idea.

    I know that it helps in reusability.. I have gone through few blogs they say this not to use utility class.
    I’ve also seen your videos saying create utility classes.. I’m bit confused. Please help ?

  4. Árpád Szilveszter Varga

    Nice video thank you! I just have an issue when I’m trying to navigate inside the webpage and paging to a different sub page on website the webdriver jumps back to the original URL. Can you give any advice with that? Much appreciation in advance:)

  5. Mahesh Babu Kandukuri

    Hi Naveen,
    Thanks a lot for the video. I’m looking for this session Pyest using POM
    I have a doubt here how to run only failed tests in Pytest??? do we have any package to install to run only specific fail tests wherein Java, we can run by using testng-failed.xml file.
    Awaiting for next video 🙂

  6. Shalini Nandakumar

    Hi Naveen, Thanks for the video. I implemented the same thing you showed, but got an error AttributeError: ‘LoginPage’ object has no attribute ‘driver’. Can you please help me figure out the reason for this

  7. Pedro Gutiérrez

    Hello, how are you? To make a connection with BDD behave or with pytest-bdd as it would be with the FW that you are building, I tried but could not. What if I could do is how far did you get with the framework

  8. SharatChandra Thalloory

    Was searching from a couple days for an exact video on PyTest Framework and came across this video. Its really very helpful. Now this will help me start creating a framework on my own for my project. Thank you very much Naveen 🙂

  9. Praveen Vanahalli

    Hi Naveen, Nice video. I tried the same flow but getting AttributeError: ‘TestLogin’ object has no attribute ‘driver’ in test_login_page method as below. I checked the code syntax and spelling. Everything is fine.
    def test_login_page(self):
    > self.loginPage = LoginPage(self.driver)
    E AttributeError: ‘TestLogin’ object has no attribute ‘driver’

    Tried to resolve it but not getting the right resolution to fix it.

Leave a Comment

Your email address will not be published. Required fields are marked *

*
*