datetime-selenium-0.0.0
توضیحات
Send and receive datetime objects from web forms.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | datetime-selenium-0.0.0 |
| نام | datetime-selenium |
| نسخه کتابخانه | 0.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Dillon Bowen |
| ایمیل نویسنده | dsbowen@wharton.upenn.edu |
| آدرس صفحه اصلی | https://dsbowen.github.io/datetime-selenium |
| آدرس اینترنتی | https://pypi.org/project/datetime-selenium/ |
| مجوز | - |
Datetime-Selenium allows you to send/retrieve `datetime.datetime` objects to/from web forms using [Selenium](https://selenium-python.readthedocs.io/).
## Installation
```
$ pip install datetime-selenium
```
## Quickstart
First, clone an example file from the Datetime-Selenium repo.
```bash
$ curl https://raw.githubusercontent.com/dsbowen/datetime-selenium/master/form.html --output form.html
```
Let's send the current date and time to all input in the form.
```python
from datetime_selenium import send_datetime
from selenium.webdriver import Chrome
from datetime import datetime
driver = Chrome()
driver.get('data:text/html,'+open('form.html').read())
datetime_ = datetime.utcnow()
css_selectors = (
'input[type=date]',
'input[type=datetime-local]',
'input[type=month]',
'input[type=time]',
'input[type=week]'
)
for selector in css_selectors:
input_ = driver.find_element_by_css_selector(selector)
send_datetime(input_, datetime_)
```
You'll see the form filled in in your selenium browser.
## Citation
```
@software{bowen2020datetime-selenium,
author = {Dillon Bowen},
title = {Datetime-Selenium},
url = {https://dsbowen.github.io/datetime-selenium/},
date = {2020-06-29},
}
```
## License
Users must cite this package in any publications which use it.
It is licensed with the MIT [License](https://github.com/dsbowen/datetime-selenium/blob/master/LICENSE).
نیازمندی
| مقدار | نام |
|---|---|
| >=3.141.0 | selenium |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl datetime-selenium-0.0.0:
pip install datetime-selenium-0.0.0.whl
نصب پکیج tar.gz datetime-selenium-0.0.0:
pip install datetime-selenium-0.0.0.tar.gz