README.md in true_automation-0.3.4 vs README.md in true_automation-0.3.5

- old
+ new

@@ -5,28 +5,32 @@ ## Setup **true_automation** gem provides helper DSL method, that can be used instead of Selenium/Capybara locators. Initial setup aim is to make `ta` method visible for your code. -You need **trueautomation** npm package installed globally first. It requires NodeJS 9+. -We recommend to use [nvm](https://github.com/creationix/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows) -to install Node. +You need TrueAutomation.IO client installed first. -When right version of Node is installed run the following command: +To install it just run the following command in your terminal. Using cURL: - $ npm install -g trueautomation + curl -o- http://trueautomation.io/installer.sh | bash + +Or using wget + wget -qO- http://trueautomation.io/installer.sh | bash + +Then restart your terminal to start using TrueAutomation.IO + ### Automatic Setup Run `trueautomation init` inside your project directory. TrueAutomation installer automatically detects technology used in your project. Currently we support Capybara/RSpec automatic setup only. #### Capybara/RSpec -For Capybara/RSpec projects TrueAutomation installer adds **true_automation** gem to the Gemfile, and includes TrueAutomation -DSL to `rspec_helper.rb`. +For Capybara/RSpec projects TrueAutomation installer adds **true_automation** gem to the Gemfile, includes TrueAutomation +DSL to `rspec_helper.rb` and replaces WebDriver with TrueAutomaton.IO Driver #### Other For other Ruby-based stacks installer just adds **true_automation** gem to the Gemfile. Check *Manual Setup* section for setup guide. @@ -40,9 +44,51 @@ ``` And then execute: $ bundle install + +#### Using TrueAutomaton.IO Capybara WebDriver + +```ruby +require 'true_automation/driver/capybara' +``` + +To initialize WebDriver for Capybara +```ruby +TrueAutomation::Driver::Capybara.new(app, port: 9515) +``` + +#### Controlling TrueAutomation.IO Driver lifecycle + +```ruby +require 'true_automation/client' +``` + +Initialize the client + +```ruby +ta_client = TrueAutomation::Client.new +``` + +Start the client: +```ruby +ta_client.start(port: 9515) +``` + +Wait until client is started: +```ruby +ta_client.wait_until_start +``` + +Stop the client: +```ruby +ta_client.stop +``` + +Client automatically writes the log in `./log/trueautomation-<date-time>.log` + +#### Using TrueAutomation.IO locators Add TrueAutomation DSL to your test file ```ruby require 'true_automation/dsl'