Git Product home page Git Product logo

qxf2 / qxf2-page-object-model Goto Github PK

View Code? Open in Web Editor NEW
248.0 28.0 189.0 2.42 MB

Write Selenium and Appium tests in Python using the Page Object pattern. This Pythonic GUI and API test automation framework will help you get started with QA automation quickly. It comes with many useful integrations like - email, BrowserStack, Slack, TestRail, etc. This repository is developed and maintained by Qxf2 Services.

Home Page: https://qxf2.com

License: MIT License

Python 98.79% Dockerfile 1.17% Shell 0.05%
selenium page-object qa automation automation-framework appium testrail python python3

qxf2-page-object-model's People

Contributors

ajitava-git avatar akkuldn avatar archana-gs avatar arunkumarmuralidharan avatar aruulbhagkya avatar avinash010 avatar charlesdebarros avatar dependabot[bot] avatar drishyatm avatar indiranell avatar kirancv4 avatar mohanqxf2 avatar nilaya123 avatar preedhivivek avatar qxf2 avatar qxf2-blr avatar raddhakrishnan avatar rahul-bhave avatar rajiqxf2 avatar rajkumar-94 avatar rohandudam avatar rohanj-qxf2 avatar rohinigopalqxf2 avatar shivahari avatar smitharajesh avatar sravanti25 avatar sravantit25 avatar tokashraf avatar verma-rajatk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qxf2-page-object-model's Issues

Improve the exception being sent to the tests

Ideally, I'd like to know where the exception occurred (file, line). Currently, I only see the exception type and message.

Work around: When a test fails, I end up replacing 'try' with 'if True' and commenting out the 'except' part.

Failed to install dependencies

MacOS v10.14.5
Try to install dependencies but failed:
pip3 install -r requirements.txt to install dependencies
Collecting to Using cached https://files.pythonhosted.org/packages/05/8b/949ffc9ca52aca12b21985f6d97e7946c8c284a638ee15d8851592014fbe/to-0.3.tar.gz Collecting install ERROR: Could not find a version that satisfies the requirement install (from versions: none) ERROR: No matching distribution found for install

Test boilerplate should have one log message clearly indicating the start of the test and its date

Test boilerplate should have one log message clearly indicating the start of the test and its date. We just append log messages to the test's log. That makes it hard for me to know where the previous test ended and where the re-run started.

Can we please add a log message to all our example tests to show where the test started. It would be good if the log message had a clear, human-readable timestamp (so not Unix time) to tell me when the test kicked off. Make sure that the visual representation of the message is clear and easy to spot when scrolling through logs. E.g.: Add a couple of new lines and some textual decorator and use CAPS.

Fix conftest.py

I am getting a warning message from conftest.py file

'PytestDeprecationWarning: the pytest.config global is deprecated. Please use request.config or pytest_configure (if you're a pytest plugin) instead.
if pytest.config.getoption("-I").lower() == 'y':`

Add a way to email pytest results

Slack integration is fantastic. But I can see some use cases where we may want to email a set of people. Can we add a hook to pytest so it emails results?

Log messages must have the right module listed

I only see Base_Page.write() as the calling modulein the log messages. That makes debugging really hard. I think this broke with the introduction of loguru but I could be wrong.

Example of a bad log message:
2019-07-11 16:57:08.656 | INFO | utils.Base_Logging:write:60 - conditional_write | Found the expected item 'Gary Bio Sandalwood SPF-50' in the cart

^Notice that utils.Base_Logging:write:60 - conditional_write is completely useless. I want to know something more about who called that message.

test_api_example.py does not take command line options

test_api_example.py does not take command line options. This is a break in pattern from our other tests. Please add options in main for the test.

You will notice that you cannot simply do python tests/test_api_example.py -U http://localhost:5000 to run the test. We seem to need to use pytest (-A option is not documented anywhere) to send a URL. Reporting on behalf of @rajeshyelwal who noticed this issue.

Fix Base Mechanize

In the def post(self, url, data=None, headers={}) method line number 11 i.e 63 rd line in the Base_Mechanize.py file
while i was using this file for Engineering Benchmark api test.
i am getting the error on line number 63. (Python says:isinstance expected 2 arguments, got 3)
so i removed mechanize.URLError and it worked for me.
Please fix the issue

Change the way we figure out the name of the calling module.

Change the way we figure out the name of the calling module. We seem to be using non-relative array indexes (e.g.: [4]) and that won't work as we keep adding pytest plugins. We should try to do something more intelligent. E.g.: Check for the string 'test_'?

Screenshot decorator should be called before the exception decorator

I noticed in at least one object (form object) that we are calling exception decorator before the screenshot decorator. This results in the screenshot names becoming inner.png instead of the more useful <method_name>.png. Fix it by changing the order of the decorators.

Add debug support for GUI tests

Developing GUI tests can be a pain. Can we do something to make it easier?

I know that within Qxf2, we have re-used Selenium sessions and also used pdb to step into code. Can we bring those techniques into the framework itself?

Update data running tests

Update the data we use for running test.Basecamp is removed and test has given Chess piece names in example_form and successive_form_creation.

Add .pytest_cache/ to gitignore

Add .pytest_cache/ to gitignore. We hit this issue when working on our internal repo.

Filing an issue (more time consuming) instead of directly fixing because this is a good first issue for people new to git.

get_element() of Base_Page should not be appending exception message if called with verbose_flag=False

I wrote a simple test for login and logout of an application. I used the presence of an element after login to verify that the login happened successfully. In other words, I used check_element_present(). When i gave the wrong password, the failure summary is misleading because somehow get_element() always appends the exception message even when the exception is expected. Can we move the exception append into the condition that checks for verbose_flag?

One line is badly formatted in the readme

I noticed this line: "python tests/test_api_example.py (make sure to run sample cars-api available at qxf2/cars-api repository before api test run)" is bold in the readme. Fix it.

Add visual highlighting to elements being operated upon

I used a tool called PAMIE a long while ago. One of its nice features was that it gave a thick yellow highlight around the element being operated upon.

Can we develop a feature like that? The user should be able to turn on the feature when they are developing and then turn it off during actual test runs.

Add a new file with test boilerplate

We don't have an easy and intuitive way to write a test from scratch. Can we add a simple test_boilerplate.py file to the tests folder? Make sure to add it to the pytest ignore options.

Btw, let us not add any testrail or tesults boiler plate code. Just imports, method signature, expected/actual pass logic, creating the first page object, registering the driver, creating the test summary, assert and main should do.

optparse module is deprecated as of Python 2.7

The optparse module used in the Option_Parser utility class is deprecated as of Python 2.7. The command line option parsing functions implemented in the Option_Parse class using optparse module can achieved using the new argparse

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.