repo_id stringclasses 208
values | file_path stringlengths 31 190 | content stringlengths 1 2.65M | __index_level_0__ int64 0 0 |
|---|---|---|---|
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/endpoints/cars_api_endpoints.py | """
API methods for /cars endpoint
"""
from .base_api import BaseAPI
class CarsAPIEndpoints(BaseAPI):
"Class for cars endpoints"
def cars_url(self,suffix=''):
"""Append API end point to base URL"""
return self.base_url+'/cars'+suffix
def add_car(self,data,headers):
"Adds a new car... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/tests/test_weather_shopper_app.py | """
Automated test for Weather Shopper mobile application
"""
# pylint: disable=E0401, C0413
import time
import os
import sys
import pytest
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from page_objects.PageFactory import PageFactory
import conf.weather_shopper_mobile_conf as conf
@pyt... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/tests/test_weather_shopper_app_menu_options.py | """
Automated test for Weather Shopper mobile application to validate:
1. Menu labels
2. Menu link redirects
The test clicks the links in Menu options and validates the URL in the Webview
"""
# pylint: disable=E0401, C0413
import time
import os
import sys
import pytest
sys.path.append(os.path.dirname(os.path.dirname(... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/tests/test_example_form.py | """
This is an example automated test to help you learn Qxf2's framework
Our automated test will do the following:
#Open Qxf2 selenium-tutorial-main page.
#Fill the example form.
#Click on Click me! button and check if its working fine.
"""
import os,sys,time
sys.path.append(os.path.dirname(os.path.dirname(... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/tests/test_mobile_bitcoin_price.py | """
Automated test will do the following:
# Open Bitcoin Info application in emulator.
# Click on the bitcoin real time price page button.
# Compare expected bitcoin real time price page heading with current page heading.
# Verify that the bitcoin real time price is displayed on the page.
# Display ... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/tests/test_api_async_example.py | """
API Async EXAMPLE TEST
This test collects tasks using asyncio.TaskGroup object \
and runs these scenarios asynchronously:
1. Get the list of cars
2. Add a new car
3. Get a specifi car from the cars list
4. Get the registered cars
"""
import asyncio
import os
import sys
import pytest
sys.path.append(os.path.dirname... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/tests/test_example_table.py | """
This is an example automated test to help you learn Qxf2's framework
Our automated test will do the following:
#Open Qxf2 selenium-tutorial-main page.
#Print out the entire table
#Verify if a certain name is present in the table
"""
#The import statements import: standard Python modules,conf,credential... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/tests/test_boilerplate.py | """
This test file will help you get started in writing a new test using our framework
"""
import os,sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from page_objects.PageFactory import PageFactory
import pytest
@pytest.mark.GUI
def test_boilerplate(test_obj):
"Run the test"
... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/tests/test_weather_shopper_payment_app.py | """
Automated test for Weather Shopper mobile application -
Mock Payment screen field validations.
Pre-requisite: Before running this test-
**************************************************************
For LINUX Users, please run the below two commands from CLI
- run: sudo apt-get update
- run: sudo apt-get install ... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/tests/test_api_example.py | """
API EXAMPLE TEST
1. Add new car - POST request(without url_params)
2. Get all cars - GET request(without url_params)
3. Verify car count
4. Update newly added car details -PUT request
5. Get car details -GET request(with url_params)
6. Register car - POST request(with url_params)
7. Get list of registered cars -GE... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/tests/test_successive_form_creation.py | """
This is an example automated test to help you learn Qxf2's framework
Our automated test will do the following action repeatedly to fill number of forms:
#Open Qxf2 selenium-tutorial-main page.
#Fill the example form
#Click on Click me! button and check if its working fine
"""
#The import statements impo... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/tests/test_accessibility.py | """
This test file runs accessibility checks on multiple pages of the Selenium tutorial pages using Axe.
It compares the Axe violation results to previously saved snapshots to identify new violations.
If new violations are found, they are logged in a violation record file.
Pages tested:
1. Selenium tutorial main pa... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/ssh_util.py | """
Qxf2 Services: Utility script to ssh into a remote server
* Connect to the remote server
* Execute the given command
* Upload a file
* Download a file
"""
import os,sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import socket
import paramiko
from dotenv import load_dotenv
load_d... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/xpath_util.py | """
Qxf2 Services: Utility script to generate XPaths for the given URL
* Take the input URL from the user
* Parse the HTML content using BeautifulSoup
* Find all Input and Button tags
* Guess the XPaths
* Generate Variable names for the xpaths
* To run the script in Gitbash use command 'python -u utils/xpath_util.py'
"... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/results.py | """
Tracks test results and logs them.
Keeps counters of pass/fail/total.
"""
import logging
from utils.Base_Logging import Base_Logging
class Results(object):
""" Base class for logging intermediate test outcomes """
def __init__(self, level=logging.DEBUG, log_file_path=None):
self.logger = Base_Log... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/Image_Compare.py | """
Qxf2 Services: Utility script to compare images
* Compare two images(actual and expected) smartly and generate a resultant image
* Get the sum of colors in an image
"""
from PIL import Image, ImageChops
import math, os
def rmsdiff(im1,im2):
"Calculate the root-mean-square difference between two images"
h ... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/stop_test_exception_util.py | '''
This utility is for Custom Exceptions.
a) Stop_Test_Exception
You can raise a generic exceptions using just a string.
This is particularly useful when you want to end a test midway based on some condition.
'''
class Stop_Test_Exception(Exception):
def __init__(self,message):
self.message=message
... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/__init__.py |
"Check if dict item exist for given key else return none"
def get_dict_item(from_this, get_this):
""" get dic object item """
if not from_this:
return None
item = from_this
if isinstance(get_this, str):
if get_this in from_this:
item = from_this[get_this]
else:
... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/gpt_summary_generator.py | """
Utility function which is used to summarize the Pytest results using LLM (GPT-4).
And provide recommendations for any failures encountered.
The input for the script is a log file containing the detailed Pytest results.
It then uses the OpenAI API to generate a summary based on the test results.
The summary is writt... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/snapshot_util.py | """
Snapshot Integration
* This is a class which extends the methods of Snapshot parent class
"""
import os
import json
from loguru import logger
from deepdiff import DeepDiff
from datetime import datetime
from pytest_snapshot.plugin import Snapshot
import conf.snapshot_dir_conf
class Snapshotutil(Snapshot):
"Snap... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/Base_Logging.py | """
Qxf2 Services: A plug-n-play class for logging.
This class wraps around Python's loguru module.
"""
import os, inspect
import sys
import logging
from loguru import logger
import re
from reportportal_client import RPLogger, RPLogHandler
class Base_Logging():
"A plug-n-play class for logging"
def __init__(se... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/accessibility_util.py | """
Accessibility Integration
* This is a class which extends the methods of Axe parent class
"""
import os
from axe_selenium_python import Axe
script_url=os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "utils", "axe.min.js"))
class Accessibilityutil(Axe):
"Accessibility object to run accessibility... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/clean_up_repo.py | """
The Qxf2 automation repository ships with example tests.
Run this file to delete all the example files and start fresh with your example.
Usage: python clean_up_repo.py
"""
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from conf import clean_up_repo_conf as conf
f... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/interactive_mode.py | """
Implementing the questionaty library to fetch the users choices for different arguments
"""
import os
import sys
import questionary
from clear_screen import clear
from conf import base_url_conf
from conf import browser_os_name_conf as conf
def display_gui_test_options(browser,browser_version,os_version,
... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/excel_compare.py | """
Qxf2 Services: Utility script to compare two excel files using openxl module
"""
import openpyxl
import os
class Excel_Compare():
def is_equal(self,xl_actual,xl_expected):
"Method to compare the Actual and Expected xl file"
result_flag = True
if not os.path.exists(xl_actual):
... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/axe.min.js | !function e(window){var document=window.document,T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function c(e){this.name="SupportError",this.cause=e.cause,this.mess... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/csv_compare.py | """
Qxf2 Services: Utility script to compare two csv files.
"""
import csv,os
class Csv_Compare():
def is_equal(self,csv_actual,csv_expected):
"Method to compare the Actual and Expected csv file"
result_flag = True
if not os.path.exists(csv_actual):
result_flag = False
... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/Wrapit.py | """
Class to hold miscellaneous but useful decorators for our framework
"""
from inspect import getfullargspec
import traceback
class Wrapit():
"Wrapit class to hold decorator functions"
def _exceptionHandler(f):
"Decorator to handle exceptions"
def inner(*args,**kwargs):
try:
... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/utils/copy_framework_template.py | r"""
This script would copy the required framework files from the input source to
the input destination given by the user.
1. Copy root files from POM to the newly created destination directory.
2. Create the sub-folder to copy files from POM\conf.
3. Create the sub-folder to copy files from POM\page_objects.
4. Create... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations | qxf2_public_repos/qxf2-page-object-model/integrations/cross_browsers/remote_options.py | """
Set the desired option for running the test on a remote platform.
"""
from selenium.webdriver.firefox.options import Options as FirefoxOptions
from selenium.webdriver.edge.options import Options as EdgeOptions
from selenium.webdriver.chrome.options import Options as ChromeOptions
from selenium.webdriver.safari.opti... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations | qxf2_public_repos/qxf2-page-object-model/integrations/cross_browsers/saucelab_runner.py | """
Get the webdriver and mobiledriver for SauceLab.
"""
import os
from selenium import webdriver
from integrations.cross_browsers.remote_options import RemoteOptions
from conf import remote_url_conf
class SauceLabRunner(RemoteOptions):
"""Configure and get the webdriver and the mobiledriver for SauceLab"""
de... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations | qxf2_public_repos/qxf2-page-object-model/integrations/cross_browsers/browserstack_runner.py | """
Get the webdriver and mobiledriver for BrowserStack.
"""
import os
from selenium import webdriver
from integrations.cross_browsers.remote_options import RemoteOptions
from conf import screenshot_conf
from conf import remote_url_conf
class BrowserStackRunner(RemoteOptions):
"""Configure and get the webdriver an... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations | qxf2_public_repos/qxf2-page-object-model/integrations/cross_browsers/lambdatest_runner.py | """
Get the webdriver for LambdaTest browsers.
"""
import os
import time
import requests
from selenium import webdriver
from integrations.cross_browsers.remote_options import RemoteOptions
from conf import remote_url_conf
class LambdaTestRunner(RemoteOptions):
"""Configure and get the webdriver for the LambdaTest"... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations | qxf2_public_repos/qxf2-page-object-model/integrations/cross_browsers/BrowserStack_Library.py | """
First version of a library to interact with BrowserStack's artifacts.
For now, this is useful for:
a) Obtaining the session URL
b) Obtaining URLs of screenshots
To do:
a) Handle expired sessions better
"""
import os
import requests
from conf import remote_url_conf
class BrowserStack_Library():
"BrowserStack ... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations | qxf2_public_repos/qxf2-page-object-model/integrations/reporting_tools/Test_Rail.py | """
TestRail integration:
* limited to what we need at this time
* we assume TestRail operates in single suite mode
i.e., the default, reccomended mode
API reference: http://docs.gurock.com/testrail-api2/start
"""
import os,sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from integra... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations | qxf2_public_repos/qxf2-page-object-model/integrations/reporting_tools/testrail_client.py | #
# TestRail API binding for Python 3.x (API v2, available since
# TestRail 3.0)
# Compatible with TestRail 3.0 and later.
#
# Learn more:
#
# http://docs.gurock.com/testrail-api2/start
# http://docs.gurock.com/testrail-api2/accessing
#
# Copyright Gurock Software GmbH. See license.md for details.
#
import requests
im... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations | qxf2_public_repos/qxf2-page-object-model/integrations/reporting_tools/Tesults.py | import os
import tesults
cases = []
def add_test_case(data):
cases.append(data)
def post_results_to_tesults ():
" This method is to post the results into the tesults"
# uses default token unless otherwise specified
token = os.getenv('tesults_target_token_default')
if not token:
solution ... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations | qxf2_public_repos/qxf2-page-object-model/integrations/reporting_tools/setup_testrail.py | """
One off utility script to setup TestRail for an automated run
This script can:
a) Add a milestone if it does not exist
b) Add a test run (even without a milestone if needed)
c) Add select test cases to the test run using the setup_testrail.conf file
d) Write out the latest run id to a 'latest_test_run.txt' file
Th... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations | qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels/email_util.py | """
A simple IMAP util that will help us with account activation
* Connect to your imap host
* Login with username/password
* Fetch latest messages in inbox
* Get a recent registration message
* Filter based on sender and subject
* Return text of recent messages
[TO DO](not in any particular order)
1. Extend to POP3 s... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations | qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels/post_test_reports_to_slack.py | '''
A Simple script which used to post test reports on Slack Channel.
Steps to Use:
1. Generate Slack incoming webhook url by reffering our blog:
https://qxf2.com/blog/post-pytest-test-results-on-slack/ & add url in our code
2. Generate test report log file by adding ">log/pytest_report.log" command
at end of pytest... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations | qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels/email_pytest_report.py | """
Qxf2 Services: Script to send pytest test report email
* Supports both text and html formatted messages
* Supports text, html, image, audio files as an attachment
To Do:
* Provide support to add multiple attachment
Note:
* We added subject, email body message as per our need. You can update that as per your requi... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels | qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels/gmail/__init__.py |
"""
GMail! Woo!
"""
__title__ = 'gmail'
__version__ = '0.1'
__author__ = 'Charlie Guo'
__build__ = 0x0001
__license__ = 'Apache 2.0'
__copyright__ = 'Copyright 2013 Charlie Guo'
from .gmail import Gmail
from .mailbox import Mailbox
from .message import Message
from .exceptions import GmailException, ConnectionErr... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels | qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels/gmail/message.py | import datetime
import email
import re
import time
import os
from email.header import decode_header
class Message():
"Message class provides methods for mail functions."
def __init__(self, mailbox, uid):
self.uid = uid
self.mailbox = mailbox
self.gmail = mailbox.gmail if mailbox else No... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels | qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels/gmail/gmailtest.py | """
This is an example automated test to check gmail utils
Our automated test will do the following:
#login to gmail and fetch mailboxes
#After fetching the mail box ,select and fetch messages and print the number of messages
#and the subject of the messages
Prerequisites:
- Gmail account with app pas... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels | qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels/gmail/gmail.py | """
This module defines the `Gmail` class, which provides methods to interact with a Gmail account
via IMAP. The class includes functionalities to connect to the Gmail server, login using
credentials, and manage various mailboxes. Also, has functions for fetching mailboxes,
selecting a specific mailbox, searching for ... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels | qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels/gmail/utils.py |
from .gmail import Gmail
def login(username, password):
gmail = Gmail()
gmail.login(username, password)
return gmail
def authenticate(username, access_token):
gmail = Gmail()
gmail.authenticate(username, access_token)
return gmail | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels | qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels/gmail/mailbox.py | """
This module defines the `Mailbox` class, which represents a mailbox in a Gmail account.
The class provides methods to interact with the mailbox, including searching for emails
based on various criteria, fetching email threads, counting emails, and managing cached
messages.
"""
import re
from .message import Mes... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels | qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels/gmail/exceptions.py | # -*- coding: utf-8 -*-
"""
gmail.exceptions
~~~~~~~~~~~~~~~~~~~
This module contains the set of Gmails' exceptions.
"""
class GmailException(RuntimeError):
"""There was an ambiguous exception that occurred while handling your
request."""
class ConnectionError(GmailException):
"""A Connection error oc... | 0 |
qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels | qxf2_public_repos/qxf2-page-object-model/integrations/reporting_channels/gmail/utf.py | """
# The contents of this file has been derived code from the Twisted project
# (http://twistedmatrix.com/). The original author is Jp Calderone.
# Twisted project license follows:
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (th... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/page_objects/zero_page.py | """
This class models the first dummy page needed by the framework to start.
URL: None
Please do not modify or delete this page
"""
from core_helpers.web_app_helper import Web_App_Helper
class Zero_Page(Web_App_Helper):
"Page Object for the dummy page"
def start(self):
"Use this method to go to specif... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/page_objects/PageFactory.py | """
PageFactory uses the factory design pattern.
get_page_object() returns the appropriate page object.
Add elif clauses as and when you implement new pages.
Pages implemented so far:
1. Tutorial main page
2. Tutorial redirect page
3. Contact Page
4. Bitcoin main page
5. Bitcoin price page
"""
# pylint: disable=import-... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/page_objects/zero_mobile_page.py | """
This class models the first dummy page needed by the framework to start.
URL: None
Please do not modify or delete this page
"""
from core_helpers.mobile_app_helper import Mobile_App_Helper
class Zero_Mobile_Page(Mobile_App_Helper):
"Page Object for the dummy page"
def start(self):
"Use this method... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/weather_shopper_mobile_app/navigation_menu_objects.py | """
This class models the navigation menu in Weathershopper application.
"""
import conf.locators_conf as locators
from utils.Wrapit import Wrapit
class NavigationMenuObjects:
"Page objects for the navigation menu in Weathershopper application."
@Wrapit._exceptionHandler
@Wrapit._screenshot
def view_m... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/weather_shopper_mobile_app/weather_shopper_cart_page.py | """
This class models the cart page in Weathershopper application.
"""
# pylint: disable = W0212,E0401
from utils.Wrapit import Wrapit
from core_helpers.mobile_app_helper import Mobile_App_Helper
from .cart_objects import CartObjects
class WeatherShopperCartPage(Mobile_App_Helper, CartObjects):
"Page objects for t... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/weather_shopper_mobile_app/cart_objects.py | """
This class models the objects of the cart in Weathershopper application.
"""
import conf.locators_conf as locators
from utils.Wrapit import Wrapit
import re
class CartObjects:
"""
Page Objects for the cart in Weather Shopper application
"""
@Wrapit._exceptionHandler
@Wrapit._screenshot
def... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/weather_shopper_mobile_app/product_page_objects.py | """
This class models the page objects for the products in Weathershopper application.
"""
import conf.locators_conf as locators
from utils.Wrapit import Wrapit
class ProductPageObjects:
"Page objects for the products in Weathershopper application."
@Wrapit._exceptionHandler
@Wrapit._screenshot
def add... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/weather_shopper_mobile_app/weather_shopper_payment_objects.py | """
Page object for the payment page in Weathershopper application.
"""
# pylint: disable = W0212,E0401,W0104,R0913,R1710,W0718,E0402
import conf.locators_conf as locators
from utils.Wrapit import Wrapit
from core_helpers.mobile_app_helper import Mobile_App_Helper
class WeatherShopperPaymentPageObjects(Mobile_App_He... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/weather_shopper_mobile_app/webview_chrome.py | """
Page object to test Webview Chrome for Weathershopper application.
"""
# pylint: disable = W0212,E0401
from utils.Wrapit import Wrapit
from core_helpers.mobile_app_helper import Mobile_App_Helper
from urllib.parse import unquote
class WebviewChrome(Mobile_App_Helper):
"Page object for ChromeView interaction"
... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/weather_shopper_mobile_app/weather_shopper_payment_page.py | """
The payment page in Weathershopper application.
"""
# pylint: disable = W0212,E0401,W0104,R0913,R1710,W0718,E0402
import os
from PIL import Image, ImageEnhance, ImageFilter
import pytesseract
import conf.locators_conf as locators
from utils.Wrapit import Wrapit
from .weather_shopper_payment_objects import WeatherS... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/weather_shopper_mobile_app/weather_shopper_home_page.py | """
This class models the home page in Weathershopper application.
"""
# pylint: disable = W0212,E0401
from core_helpers.mobile_app_helper import Mobile_App_Helper
from .homepage_objects import HomepageObjects
from .navigation_menu_objects import NavigationMenuObjects
import conf.locators_conf as locators
from utils.Wr... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/weather_shopper_mobile_app/homepage_objects.py | """
This class models the objects of the home screen in Weathershopper application.
"""
import conf.locators_conf as locators
from utils.Wrapit import Wrapit
import secrets
class HomepageObjects:
"Page object for the home screen in Weathershopper application."
@Wrapit._exceptionHandler
def visit_product_p... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/weather_shopper_mobile_app/weather_shopper_product_page.py | """
Page objects for the product page in Weathershopper application.
"""
# pylint: disable = W0212,E0401
from utils.Wrapit import Wrapit
from core_helpers.mobile_app_helper import Mobile_App_Helper
from .product_page_objects import ProductPageObjects
from .navigation_menu_objects import NavigationMenuObjects
class Wea... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/selenium_tutorial_webpage/tutorial_main_page.py | """
This class models the main Selenium tutorial page.
URL: selenium-tutorial-main
The page consists of a header, footer, form and table objects
"""
from core_helpers.web_app_helper import Web_App_Helper
from .form_object import Form_Object
from .header_object import Header_Object
from .table_object import Table_Object... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/selenium_tutorial_webpage/form_object.py | """
This class models the form on the Selenium tutorial page
The form consists of some input fields, a dropdown, a checkbox and a button
"""
import conf.locators_conf as locators
from utils.Wrapit import Wrapit
class Form_Object:
"Page object for the Form"
#locators
name_field = locators.name_field
e... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/selenium_tutorial_webpage/header_object.py | """
This class models the Qxf2.com header as a Page Object.
The header consists of the Qxf2 logo, Qxf2 tag-line and the hamburger menu
Since the hanburger menu is complex, we will model it as a separate object
"""
from .hamburger_menu_object import Hamburger_Menu_Object
import conf.locators_conf as locators
from utils... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/selenium_tutorial_webpage/table_object.py | """
This class models the table on the Selenium tutorial page
"""
import conf.locators_conf as locators
from utils.Wrapit import Wrapit
class Table_Object:
"Page Object for the table"
#locators
table_xpath = locators.table_xpath
rows_xpath = locators.rows_xpath
cols_xpath = locators.cols_xpath
... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/selenium_tutorial_webpage/hamburger_menu_object.py | """
This class models the hamburger menu object as a Page Object
The hamburger menu has a bunch of options that can be:
a) Clicked
b) Hovered over
"""
import conf.locators_conf as locators
from utils.Wrapit import Wrapit
class Hamburger_Menu_Object:
"Page Object for the hamburger menu"
#locators
menu_ico... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/selenium_tutorial_webpage/tutorial_redirect_page.py | """
This class models the redirect page of the Selenium tutorial
URL: selenium-tutorial-redirect
The page consists of a header, footer and some text
"""
from core_helpers.web_app_helper import Web_App_Helper
from .header_object import Header_Object
from .footer_object import Footer_Object
import conf.locators_conf as l... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/selenium_tutorial_webpage/contact_form_object.py | """
This class models the form on contact page
The form consists of some input fields.
"""
import conf.locators_conf as locators
from utils.Wrapit import Wrapit
class Contact_Form_Object:
"Page object for the contact Form"
#locators
contact_name_field = locators.contact_name_field
@Wrapit._exceptionH... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/selenium_tutorial_webpage/contact_page.py | """
This class models the Contact page.
URL: contact
The page consists of a header, footer and form object.
"""
from core_helpers.web_app_helper import Web_App_Helper
from .contact_form_object import Contact_Form_Object
from .header_object import Header_Object
from .footer_object import Footer_Object
class Contact_Pag... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/selenium_tutorial_webpage/footer_object.py | """
This class models the footer object on qxf2.com
We model it as two parts:
1. The menu
2. The copyright
"""
from datetime import datetime
import conf.locators_conf as locators
from utils.Wrapit import Wrapit
class Footer_Object:
"Page object for the footer class"
#locators
footer_menu = locators.foote... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/bitcoin_mobile_app/bitcoin_main_page.py | """
Page object for Bitcoin main Page.
"""
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import conf.locators_conf as locators
from utils.Wrapit import Wrapit
from core_helpers.mobile_app_helper import Mobile_App_Helper
class Bitcoin_Main_Page(Mobile_App_Helper):
... | 0 |
qxf2_public_repos/qxf2-page-object-model/page_objects/examples | qxf2_public_repos/qxf2-page-object-model/page_objects/examples/bitcoin_mobile_app/bitcoin_price_page.py | """
Page object for Bitcoin price Page.
"""
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import conf.locators_conf as locators
from utils.Wrapit import Wrapit
from core_helpers.mobile_app_helper import Mobile_App_Helper
class Bitcoin_Price_Page(Mobile_App_Helper):
... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/api_auto_generator/Endpoint_Generator.md | # Auto Generate Endpoint modules for API Automation Framework #
The Endpoint generator project helps automate creating API automation tests using <a href="https://qxf2.com">Qxf2's</a> <a href="https://qxf2.com/blog/easily-maintainable-api-test-automation-framework/">API Automation framework</a>. It generates Endpoint m... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/api_auto_generator/endpoint_module_generator.py | """
What does this module do?
- It creates an Endpoint file with a class from the OpenAPI spec
- The path key in the spec is translated to an Endpoint
- The operations(http methods) for a path is translated to instance methods for the Endpoint
- The parameters for operations are translated to function parameters for th... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/api_auto_generator/openapi_spec_parser.py | """
OpenAPI specification Parser
"""
# pylint: disable=locally-disabled, multiple-statements, fixme, line-too-long
# pylint: disable=too-many-nested-blocks
from typing import Union, TextIO
from openapi_parser import parse, specification
from openapi_spec_validator.readers import read_from_filename
from openapi_spec_v... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/api_auto_generator/endpoint_name_generator.py | """
Module to generate:
1. Module name
2. Class name
3. Method name
"""
import re
from typing import Union
from packaging.version import Version, InvalidVersion
class NameGenerator():
"Base class for generating names"
def __init__(self,
endpoint_url: str,
if_q... | 0 |
qxf2_public_repos/qxf2-page-object-model/api_auto_generator | qxf2_public_repos/qxf2-page-object-model/api_auto_generator/templates/endpoint_template.jinja2 | {#- This template is used to generate Endpoints file for the API Test Automation Framework -#}
"""
This Endpoint file is generated using the api_auto_generator/endpoint_module_generator.py module
"""
from .base_api import BaseAPI
class {{class_name}}(BaseAPI):
def {{class_content['url_method_name']}}(self, suff... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/clean_up_repo_conf.py | """
The file will have relative paths for dir and respective files which clean_up_repo.py will delete.
"""
import os
# Declaring directories as directory list
# dir_list : list
REPO_DIR = os.path.dirname(os.path.dirname(__file__))
CONF_DIR = os.path.join(REPO_DIR, 'conf')
ENDPOINTS_DIR = os.path.join(REPO_DIR, 'endpoi... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/testrail_caseid_conf.py | """
Conf file to hold the testcase id
"""
test_example_form = 125
test_example_table = 126
test_example_form_name = 127
test_example_form_email = 128
test_example_form_phone = 129
test_example_form_gender = 130
test_example_form_footer_contact = 131
test_bitcoin_price_page_header = 234
test_bitcoin_real_time_price = 2... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/successive_form_creation_conf.py | """
Conf file for test_successive_form_creation
"""
form1 = {'NAME':'rook','EMAIL':'rook@qxf2.com','PHONE_NO':'1111111111','GENDER':'Male'}
form2 = {'NAME':'pawn','EMAIL':'pawn@qxf2.com','PHONE_NO':'2222222222','GENDER':'Male'}
form3 = {'NAME':'bishop','EMAIL':'bishop@qxf2.com','PHONE_NO':'3333333333','GENDER':'Male'}... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/remote_url_conf.py | #The URLs for connecting to BrowserStack and Sauce Labs.
browserstack_url = "http://hub-cloud.browserstack.com/wd/hub"
browserstack_app_upload_url = "https://api-cloud.browserstack.com/app-automate/upload"
browserstack_api_server_url = "https://api.browserstack.com/automate"
browserstack_cloud_api_server_url = "https:... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/snapshot_dir_conf.py | """
Conf file for snapshot directory
"""
import os
snapshot_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),'conf', 'snapshot')
page_names = ["main", "redirect", "contact"] | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/ports_conf.py | """
Specify the port in which you want to run your local mobile tests
"""
port = 4723
| 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/screenshot_conf.py | BS_ENABLE_SCREENSHOTS = False
overwrite_flag = False | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/example_form_conf.py | """
Conf file for test_example_form
"""
name = "knight"
email = "knight@qxf2.com"
phone_no = 1111111111
gender = "Male" | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/api_example_conf.py | #add_car
car_details = {'name':'figo','brand':'ford','price_range':'5-8 lacs','car_type':'hatchback'}
#get_car_details
car_name_1 = 'Swift'
brand = 'Maruti'
#update
car_name_2 = 'figo'
update_car = {'name':'figo','brand':'Ford','price_range':'2-3lacs','car_type':'hatchback'}
#register_car
customer_details = {'custom... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/mobile_weather_shopper_conf.py | # Conf for Weather shopper mobile app
menu_option = {
"developed_by_label" : "Developed by Qxf2 Services",
"developed_by_url" : "https://qxf2.com/?utm_source=menu&utm_medium=click&utm_campaign=mobile WeatherShopper app",
"about_app_label" : "About This App",
"about_app_url" : "https://qxf2.com/blog/weat... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/gpt_summarization_prompt.py | summarization_prompt = """
You are a helpful assistant who specializes in providing technical solutions or recommendations to errors in Python. You will receive the contents of a consolidated log file containing results of automation tests run using Pytest. These tests were conducted using a Python Selenium framewo... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/example_table_conf.py | """
Conf file for test_example_table
"""
name = "Michael" | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/locators_conf.py | #Common locator file for all locators
#Locators are ordered alphabetically
############################################
#Selectors we can use
#ID
#NAME
#css selector
#CLASS_NAME
#LINK_TEXT
#PARTIAL_LINK_TEXT
#XPATH
###########################################
#Locators for the footer object(footer_object.py)
footer_m... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/copy_framework_template_conf.py | """
This conf file would have the relative paths of the files & folders.
"""
import os
#Files from src:
src_file1 = os.path.abspath(os.path.join(os.path.dirname(__file__),'..','__init__.py'))
src_file2 = os.path.abspath(os.path.join(os.path.dirname(__file__),'..','conftest.py'))
src_file3 = os.path.abspath(os.path.joi... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/mobile_bitcoin_conf.py | # Conf for bitcoin example
# text for bitcoin real time price in usd
expected_bitcoin_price_page_heading = "Real Time Price of Bitcoin"
| 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/base_url_conf.py | """
Conf file for base_url
"""
ui_base_url = "https://qxf2.com/"
api_base_url= "https://cars-app.qxf2.com"
| 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/browser_os_name_conf.py | """
Conf file to generate the cross browser cross platform test run configuration
"""
import os
#Conf list for local
default_browser = ["chrome"] #default browser for the tests to run against when -B option is not used
local_browsers = ["firefox","chrome"] #local browser list against which tests would run if no -M... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/conf/weather_shopper_mobile_conf.py | valid_payment_details = {
"card_type": "Debit Card",
"email": "qxf2tester@example.com",
"card_number": "1234567890123456",
"card_expiry": "12/25",
"card_cvv": "123"
}
# Defining dictionaries with invalid field entries
invalid_email_in_payment_details = {
"card_type": "Debit Card",
"email": "qxf2tester",
"card_number"... | 0 |
qxf2_public_repos/qxf2-page-object-model/conf | qxf2_public_repos/qxf2-page-object-model/conf/snapshot/snapshot_output_redirect.json | [
{
"description": "Ensures every HTML document has a lang attribute",
"help": "<html> element must have a lang attribute",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.1/html-has-lang?application=axeAPI",
"id": "html-has-lang",
"impact": "serious",
"nodes": [
... | 0 |
qxf2_public_repos/qxf2-page-object-model/conf | qxf2_public_repos/qxf2-page-object-model/conf/snapshot/snapshot_output_contact.json | [
{
"description": "Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds",
"help": "Elements must have sufficient color contrast",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.1/color-contrast?application=axeAPI",
"id": "color... | 0 |
qxf2_public_repos/qxf2-page-object-model/conf | qxf2_public_repos/qxf2-page-object-model/conf/snapshot/snapshot_output_main.json | [
{
"description": "Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds",
"help": "Elements must have sufficient color contrast",
"helpUrl": "https://dequeuniversity.com/rules/axe/3.1/color-contrast?application=axeAPI",
"id": "color... | 0 |
qxf2_public_repos/qxf2-page-object-model | qxf2_public_repos/qxf2-page-object-model/.circleci/config.yml | version: 2
jobs:
toxify:
docker:
- image: divio/multi-python
parallelism: 3
steps:
- checkout
- run: pip install tox
- run: git clone https://github.com/qxf2/bitcoin-info.git
- run: openssl aes-256-cbc -d -md sha256 -in ./conf/env_remote_enc -out ./.e... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.