Python Behave Page Object Model project
We already disacussed how to get started with Python Behave here , but let’s go a little bit further and see how python behave page Object Model projects looks like .
Just to recap what is page Object model :
Related Articles
Page Object Model is an Object Repository design pattern in Selenium WebDriver. POM creates our testing code maintainable, reusable. Page Factory is an optimized way to create object repository in POM concept.
I’m not gonna go in so much details about it , this is just a standard definition but I’ve already discussed page object model for a java seleniumn project here , also there was a discussion about design patters in testing also c# selenium page object model project is here and ruby watir page obejct model is here.
This are just some links if you are interested in other programming languages rather than python and you can inspire yourslef and refine your project or maybe you can share your suggestions in the comments section bellow.
What is behave?
behave is behaviour-driven development, Python style. , you can read the entire philosophy here.
Python behave page object model project structure
├── README.md
├── behave.ini
├── build.xml
├── failed_scenarios_screenshots
│ └── Login\ and\ click\ summer\ dresses_failed.png
├── features
│ ├── TermsSearch.feature
│ ├── __init__.py
│ ├── __init__.pyc
│ ├── environment.py
│ ├── lib
│ │ ├── __init__.py
│ │ ├── __init__.pyc
│ │ ├── pagefactory.py
│ │ ├── pagefactory.pyc
│ │ └── pages
│ │ ├── __init__.py
│ │ ├── __init__.pyc
│ │ ├── base_page_object.py
│ │ ├── base_page_object.pyc
│ │ └── google_home_page.py
│ └── steps
│ └── TermsSearch.py
├── requirements.text
├── results.json
├── seleniumframework_tests.log
└── sonar-project.properties
I’m not gonna go in details why we need page factory , why bdd , why and why , you can check my previous articles to understand more and you can clone the project from our github page here.
Happy testing!
The post How to create a python behave page object model project appeared first on Testingrepository - Testing repository - selenium webdriver solution and more.
This post first appeared on Testing Repository - Creating Testing, please read the originial post: here