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.6.1.tar.gz (33.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: PyWebUIFramework-2.6.1.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.6.1.tar.gz
Algorithm Hash digest
SHA256 1a9559c7fb40a11541dfec9cb9d62e152a4ee72c0ec8b0192132877548d9f2ea
MD5 86f67a67f82dbd68271aa72a5a807793
BLAKE2b-256 4f8bd86e2687f8f157f531386015054e9b40d45e3cbab56ef07e13574aab2d8f

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