https://github.com/kamalkhan/web-driver
A convenience wrapper around facebook's php-webdriver
https://github.com/kamalkhan/web-driver
chrome driver phantomjs php-webdriver process testing web
Last synced: 11 months ago
JSON representation
A convenience wrapper around facebook's php-webdriver
- Host: GitHub
- URL: https://github.com/kamalkhan/web-driver
- Owner: kamalkhan
- License: mit
- Created: 2020-05-17T17:13:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-07T14:29:29.000Z (over 4 years ago)
- Last Synced: 2025-02-28T10:55:48.657Z (11 months ago)
- Topics: chrome, driver, phantomjs, php-webdriver, process, testing, web
- Language: PHP
- Size: 16 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Web Driver [![Build Status][icon-status]][link-status] [![Total Downloads][icon-downloads]][link-downloads] [![MIT License][icon-license]](LICENSE.md)
Run and/or control a web driver programmatically.
- [Requirements](#requirements)
- [Install](#install)
- [Install chrome driver](#install-chrome-driver)
- [Install phantomjs driver](#install-phantomjs-driver)
- [Usage](#usage)
- [Chrome Web Driver](#chrome-web-driver)
- [Phantomjs Web Driver](#phantomjs-web-driver)
- [API](#api)
- [Example](#example)
- [Advanced](#advanced)
- [TODO](#todo)
- [Changelog](#changelog)
- [Testing](#testing)
- [Contributing](#contributing)
- [Security](#security)
- [Credits](#credits)
- [License](#license)
## Requirements
- PHP >= 5.6.4
## Install
You may install this package using [composer][link-composer].
```shell
$ composer require bhittani/web-driver --prefer-dist
```
### Install chrome driver
```shell
$ vendor/bin/install-chrome-driver
```
### Install phantomjs driver
```shell
$ vendor/bin/install-phantomjs-driver
```
## Usage
This package conveniently wraps the [Facebook's PHP Web Driver](https://github.com/php-webdriver/php-webdriver) and by default offers drivers for chrome and phantomjs.
### Chrome Web Driver
First ensure you have installed the [chrome driver](#install-chrome-driver).
```php
get('https://google.com');
$googleDotCom->getTitle(); // 'Google'
```
## Advanced
### TODO
- [ ] Document the usage of process.
- [ ] Document the usage of custom ports.
- [ ] Document the usage of payload (chrome)
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed.
## Testing
```shell
$ git clone https://github.com/kamalkhan/web-driver
$ cd web-driver
$ composer install
$ composer install-drivers
$ composer test
```
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.
## Security
If you discover any security related issues, please email `shout@bhittani.com` instead of using the issue tracker.
## Credits
- [Kamal Khan](http://bhittani.com)
- [All Contributors](https://github.com/kamalkhan/web-driver/contributors)
## License
The MIT License (MIT). Please see the [License File](LICENSE.md) for more information.
[icon-status]: https://img.shields.io/github/workflow/status/kamalkhan/web-driver/main?style=flat-square
[link-status]: https://github.com/kamalkhan/web-driver
[icon-downloads]: https://img.shields.io/packagist/dt/bhittani/web-driver.svg?style=flat-square
[link-downloads]: https://packagist.org/packages/bhittani/web-driver
[icon-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[link-composer]: https://getcomposer.org