https://github.com/browserstack/capybara-browserstack
Selenium examples for Capybara and BrowserStack Automate
https://github.com/browserstack/capybara-browserstack
Last synced: 9 months ago
JSON representation
Selenium examples for Capybara and BrowserStack Automate
- Host: GitHub
- URL: https://github.com/browserstack/capybara-browserstack
- Owner: browserstack
- Created: 2016-03-01T08:32:46.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-07-03T15:01:57.000Z (over 2 years ago)
- Last Synced: 2025-06-19T11:50:46.733Z (9 months ago)
- Language: Ruby
- Homepage: https://www.browserstack.com
- Size: 34.2 KB
- Stars: 14
- Watchers: 16
- Forks: 26
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# capybara-browserstack
[Capybara](http://jnicklas.github.io/capybara/) Integration with BrowserStack.
Master branch contains **Selenium 3** samples, for **Selenium 4 - W3C protocol** please checkout [selenium-4](https://github.com/browserstack/capybara-browserstack/tree/selenium-4) branch

## Setup
* Clone the repo
* Install dependencies `bundle install`
* To test various sample repositories with ease, it is recommended to setup `BROWSERSTACK_USERNAME` and `BROWSERSTACK_ACCESS_KEY` environment variables. Alternatively you can directly update `*.config.yml` files inside the `config/` directory with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/settings)
### Running your tests
* To run tests, run `bundle exec rake parallel`
* To run local tests, run `bundle exec rake local`
Understand how many parallel sessions you need by using our [Parallel Test Calculator](https://www.browserstack.com/automate/parallel-calculator?ref=github)
## Notes
* You can view your test results on the [BrowserStack Automate dashboard](https://www.browserstack.com/automate)
* To test on a different set of browsers, check out our [platform configurator](https://www.browserstack.com/automate/ruby#setting-os-and-browser)
* You can export the environment variables for the Username and Access Key of your BrowserStack account
```
export BROWSERSTACK_USERNAME= &&
export BROWSERSTACK_ACCESS_KEY=
```
## Additional Resources
* [Documentation for writing Automate test scripts in Ruby](https://www.browserstack.com/automate/ruby)
* [Customizing your tests on BrowserStack](https://www.browserstack.com/automate/capabilities)
* [Browsers & mobile devices for selenium testing on BrowserStack](https://www.browserstack.com/list-of-browsers-and-platforms?product=automate)
* [Using REST API to access information about your tests via the command-line interface](https://www.browserstack.com/automate/rest-api)