https://github.com/remarkablemark/codeception-selenium-safari-demo
Codeception Selenium Safari demo
https://github.com/remarkablemark/codeception-selenium-safari-demo
codeception composer demo end-to-end-testing npm php safari selenium selenium-webdriver webdriver
Last synced: about 2 months ago
JSON representation
Codeception Selenium Safari demo
- Host: GitHub
- URL: https://github.com/remarkablemark/codeception-selenium-safari-demo
- Owner: remarkablemark
- Created: 2025-03-03T22:48:02.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2025-03-03T22:52:49.000Z (about 2 months ago)
- Last Synced: 2025-03-03T23:28:53.316Z (about 2 months ago)
- Topics: codeception, composer, demo, end-to-end-testing, npm, php, safari, selenium, selenium-webdriver, webdriver
- Language: PHP
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Codeception Selenium Safari Demo
[Codeception](https://codeception.com/) is installed for acceptance, functional, and unit testing:
1. Edit `tests/Acceptance.suite.yml` to set url of your application. Change `PhpBrowser` to `WebDriver` to enable browser testing
2. Edit `tests/Functional.suite.yml` to enable a framework module. Remove this file if you don't use a framework
3. Create your first acceptance tests using `codecept g:cest Acceptance First`
4. Write first test in `tests/Acceptance/FirstCest.php`
5. Run tests using: `codecept run`## Prerequisites
### PHP
- Composer
### Node.js
- NPM
### Safari
You must enable the `Allow Remote Automation` option in Safari's Develop menu to control Safari via WebDriver:
1. Open Safari.
2. Go to the `Safari` menu in the top left corner.
3. Select `Settings...`.
4. Navigate to the `Developer` tab.
5. Check the checkbox next to `Allow remote automation`.See [instructions](https://github.com/remarkablemark/codeception-selenium-safari-demo/wiki/Safari-WebDriver).
## Install
Install the dependencies:
```sh
composer install
``````sh
npm install
```## Run
Launch [Selenium](https://www.npmjs.com/package/selenium-standalone):
```sh
npm start # npx selenium-standalone install && npx selenium-standalone start
```Tests are executed with the `run` command:
```sh
php vendor/bin/codecept run --steps
```Or run the script:
```sh
composer test
```## Resources
- [Quickstart](https://codeception.com/quickstart)
- [WebDriver](https://codeception.com/docs/modules/WebDriver)