# PyWebUIFramework
This framework is needed for simple work with Selenium.
To start working with framework you have to write the following code:
```python
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:
```json
{
"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
```python
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()
```
Raw data
{
"_id": null,
"home_page": "https://github.com/philip136/PyWebUIFramework",
"name": "PyWebUIFramework",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "PyWebUIFramework",
"author": "Philip Vasilevsky",
"author_email": "fil13698@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/02/3d/03f6a4b5255cf42bc00a039aa47a302ba69f188f1487c5d07392927c66ad/PyWebUIFramework-2.7.tar.gz",
"platform": null,
"description": "# PyWebUIFramework\nThis framework is needed for simple work with Selenium.\n\nTo start working with framework you have to write the following code:\n```python\nfrom browser.py_quality_services import PyQualityServices\n\nbrowser = PyQualityServices.get_browser()\n```\nThis line of code opens a browser, you can override the type of browser.\nYou have to create a folder called `resources`. The folder have to contain a `settings.json` file.\nExample:\n```json\n{\n \"browserName\" : \"chrome\",\n \"isRemote\": false,\n \"remoteConnectionUrl\": \"http://localhost:4444/wd/hub\",\n \"isElementHighlightEnabled\" : true,\n\n \"driverSettings\": {\n \"chrome\": {\n \"webDriverVersion\": \"latest\",\n \"capabilities\": {\n \"enableVNC\": true\n },\n \"options\": {\n \"intl.accept_languages\": \"en\",\n \"safebrowsing.enabled\": \"true\",\n \"profile.default_content_settings.popups\": \"0\",\n \"disable-popup-blocking\": \"true\",\n \"download.prompt_for_download\": \"false\",\n \"download.default_directory\": \"path_to_download_folder\"\n },\n \"pageLoadStrategy\": \"Normal\",\n \"startArguments\": []\n },\n \"firefox\": {\n \"webDriverVersion\": \"latest\",\n \"capabilities\": {\n \"enableVNC\": true\n },\n \"options\": {\n \"intl.accept_languages\": \"en\",\n \"browser.download.dir\": \"//home//selenium//downloads\",\n \"browser.download.folderList\": 2,\n \"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\",\n \"browser.helperApps.alwaysAsk.force\": false,\n \"browser.download.manager.alertOnEXEOpen\": false,\n \"browser.download.manager.focusWhenStarting\": false,\n \"browser.download.useDownloadDir\": true,\n \"browser.download.manager.showWhenStarting\": false,\n \"browser.download.manager.closeWhenDone\": true,\n \"browser.download.manager.showAlertOnComplete\": false,\n \"browser.download.manager.useWindow\": false,\n \"browser.download.panel.shown\": false\n },\n \"startArguments\": []\n },\n \"iexplorer\": {\n \"webDriverVersion\": \"3.150.1\",\n \"systemArchitecture\": \"X64\",\n \"capabilities\": {\n \"ignoreProtectedModeSettings\": true\n }\n },\n \"edge\": {\n \"webDriverVersion\": \"latest\"\n }\n },\n \"timeouts\": {\n \"timeoutImplicit\" : 10,\n \"timeoutCondition\" : 30,\n \"timeoutScript\" : 10,\n \"timeoutPageLoad\" : 15,\n \"timeoutPollingInterval\": 300,\n \"timeoutCommand\":120\n },\n \"retry\": {\n \"number\": 2,\n \"pollingInterval\": 11\n },\n \"logger\": {\n \"language\": \"en\",\n \"logPageSource\": true\n },\n \"elementCache\": {\n \"isEnabled\": false\n }\n}\n```\n\n## Working with elements\n```python\nfrom selenium.webdriver.common.by import By\nfrom browser.py_quality_services import PyQualityServices\n\nbrowser = PyQualityServices.get_browser()\n\naccept_btn = PyQualityServices.element_factory.get_button((By.XPATH, \"//button[@id='accept-btn']\"))\naccept_btn.click()\n```",
"bugtrack_url": null,
"license": "MIT",
"summary": "",
"version": "2.7",
"project_urls": {
"Homepage": "https://github.com/philip136/PyWebUIFramework"
},
"split_keywords": [
"pywebuiframework"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "023d03f6a4b5255cf42bc00a039aa47a302ba69f188f1487c5d07392927c66ad",
"md5": "62155d32ad5cf65b8d5222fc011ee594",
"sha256": "ffde43da83da58c52ba90495c8d16dc4db8b309a28c70d84ff12d9a0593121c7"
},
"downloads": -1,
"filename": "PyWebUIFramework-2.7.tar.gz",
"has_sig": false,
"md5_digest": "62155d32ad5cf65b8d5222fc011ee594",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 33655,
"upload_time": "2023-06-14T17:27:35",
"upload_time_iso_8601": "2023-06-14T17:27:35.473339Z",
"url": "https://files.pythonhosted.org/packages/02/3d/03f6a4b5255cf42bc00a039aa47a302ba69f188f1487c5d07392927c66ad/PyWebUIFramework-2.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-14 17:27:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "philip136",
"github_project": "PyWebUIFramework",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "pywebuiframework"
}