Skip to main content

No project description provided

Project description

PyWebUIFramework

This framework is needed for simple work with Selenium.

To start working with framework you have to write the following code:

from browser.py_quality_services import PyQualityServices

browser = PyQualityServices.get_browser()

This line of code opens a browser, you can override the type of browser. You have to create a folder called resources. The folder have to contain a settings.json file. Example:

{
  "browserName" : "chrome",
  "isRemote": false,
  "remoteConnectionUrl": "http://localhost:4444/wd/hub",
  "isElementHighlightEnabled" : true,

  "driverSettings": {
    "chrome": {
      "webDriverVersion": "latest",
      "capabilities": {
        "enableVNC": true
      },
      "options": {
        "intl.accept_languages": "en",
        "safebrowsing.enabled": "true",
        "profile.default_content_settings.popups": "0",
        "disable-popup-blocking": "true",
        "download.prompt_for_download": "false",
        "download.default_directory": "path_to_download_folder"
      },
      "pageLoadStrategy": "Normal",
      "startArguments": []
    },
    "firefox": {
      "webDriverVersion": "latest",
      "capabilities": {
        "enableVNC": true
      },
      "options": {
        "intl.accept_languages": "en",
        "browser.download.dir": "//home//selenium//downloads",
        "browser.download.folderList": 2,
        "browser.helperApps.neverAsk.saveToDisk": "application/octet-stream, application/x-debian-package, application/x-www-form-urlencod, application/json, application/x-compressed, application/x-zip-compressed, application/zip, multipart/x-zip, text/plain, text/csv",
        "browser.helperApps.alwaysAsk.force": false,
        "browser.download.manager.alertOnEXEOpen": false,
        "browser.download.manager.focusWhenStarting": false,
        "browser.download.useDownloadDir": true,
        "browser.download.manager.showWhenStarting": false,
        "browser.download.manager.closeWhenDone": true,
        "browser.download.manager.showAlertOnComplete": false,
        "browser.download.manager.useWindow": false,
        "browser.download.panel.shown": false
      },
      "startArguments": []
    },
    "iexplorer": {
      "webDriverVersion": "3.150.1",
      "systemArchitecture": "X64",
      "capabilities": {
        "ignoreProtectedModeSettings": true
      }
    },
    "edge": {
       "webDriverVersion": "latest"
    }
  },
  "timeouts": {
    "timeoutImplicit" : 10,
    "timeoutCondition" : 30,
    "timeoutScript" : 10,
    "timeoutPageLoad" : 15,
    "timeoutPollingInterval": 300,
    "timeoutCommand":120
  },
  "retry": {
    "number": 2,
    "pollingInterval": 11
  },
  "logger": {
    "language": "en",
    "logPageSource": true
  },
  "elementCache": {
    "isEnabled": false
  }
}

Working with elements

from selenium.webdriver.common.by import By
from browser.py_quality_services import PyQualityServices

browser = PyQualityServices.get_browser()

accept_btn = PyQualityServices.element_factory.get_button((By.XPATH, "//button[@id='accept-btn']"))
accept_btn.click()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyWebUIFramework-2.7.tar.gz (33.7 kB view details)

Uploaded Source

File details

Details for the file PyWebUIFramework-2.7.tar.gz.

File metadata

  • Download URL: PyWebUIFramework-2.7.tar.gz
  • Upload date:
  • Size: 33.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.0

File hashes

Hashes for PyWebUIFramework-2.7.tar.gz
Algorithm Hash digest
SHA256 ffde43da83da58c52ba90495c8d16dc4db8b309a28c70d84ff12d9a0593121c7
MD5 62155d32ad5cf65b8d5222fc011ee594
BLAKE2b-256 023d03f6a4b5255cf42bc00a039aa47a302ba69f188f1487c5d07392927c66ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page