https://github.com/tomoki171923/selenium-operation-package
Python package, which helps automate websites operation using Selenium. The supported browser is Google Chrome.
https://github.com/tomoki171923/selenium-operation-package
docker-compose package selenium-python
Last synced: about 2 months ago
JSON representation
Python package, which helps automate websites operation using Selenium. The supported browser is Google Chrome.
- Host: GitHub
- URL: https://github.com/tomoki171923/selenium-operation-package
- Owner: tomoki171923
- License: gpl-3.0
- Created: 2021-12-10T00:30:03.000Z (over 4 years ago)
- Default Branch: dev
- Last Pushed: 2021-12-18T04:33:04.000Z (over 4 years ago)
- Last Synced: 2024-10-18T08:54:50.306Z (over 1 year ago)
- Topics: docker-compose, package, selenium-python
- Language: Python
- Homepage:
- Size: 205 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# selenium-operation-package
Python package, which helps automate websites operation using [Selenium](https://www.selenium.dev/). The supported browser is Google Chrome.
## For User
### Install
```bash
pip install git+https://github.com/tomoki171923/selenium-operation-package#egg=selenpack
```
OR
Pipfile
```python
[packages]
selenpack = {git = "https://github.com/tomoki171923/selenium-operation-package.git", editable = true, ref = "main"}
```
OR
requirements.txt
```python
selenpack @ git+https://github.com/tomoki171923/selenium-operation-package@main
```
### Usage
```python
from selenpack.selenium_operation import SeleniumOperation
if __name__ == "__main__":
selenium = SeleniumOperation()
# visit Google.com
selenium.goPage("https://www.google.com/")
# take a screenshot
selenium.setScreenshot(folder="./", base_file_name="example")
selenium.takeScreenshot()
# Google search
el = selenium.setTextboxByName(name="q", value="weather japan")
el.submit()
# take a screenshot
selenium.takeScreenshot()
del selenium
```
### Environment
needs Selenium Server (Grid / Standalone) or Local web driver to execute selenpack.
reference the following.
## For Contributor
### Pre-Commit
```bash
brew install pre-commit
pre-commit install
```
### Build
```bash
docker-compose build
```
### Add Python Package
```bash
docker-compose run --rm app pipenv install PACKAGE_NAME
```
### Update Python Packages
```bash
docker-compose run --rm app pipenv update
```