true_automation 0.1.0 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48c26855f79dcfdbd0091ac78720fd929aa8a6bc
4
- data.tar.gz: e994573a440d59bb959a75c4d30776518dd5faf8
3
+ metadata.gz: 6d70d37175ba346864ba424d243f4b5e3f218b11
4
+ data.tar.gz: 66b4f5bfb527b47227c22c05a27a7f3736d24caa
5
5
  SHA512:
6
- metadata.gz: ef9e0068250ac084d49efd22aebf66080b2c30d03cdd2c00177d9a442ab0ba8e4f1c0f265cb21885d97c709fcef8f95967508fb4734bfb6086aff87ce9b52584
7
- data.tar.gz: 220dacaf35c27ea05ddf9af26f73bd400e79a0331debe60d3ca83ea6132c8bcc01ac022e15c9316e9ac20b34fba912397fd468a6be3ea0e08340874eb286de96
6
+ metadata.gz: 7f45f020ed106d5d622ce870ea5b16caecfba6ce69cf6cc3ea66011ff4c1a539981b882b242de131e4f046e4b68d0dc2a8304c7b7fdac7960adc1d704309efc0
7
+ data.tar.gz: 05160e0aeb806872464410f085a089df63839b4bac3641adb92ff6abf457c2db595b9114b502c42238693a14c632c6a201cde487acd868f611eac8dc66a05f10
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
 
10
10
  .idea
11
11
 
12
+ *.gem
data/README.md CHANGED
@@ -1,43 +1,77 @@
1
1
  # TrueAutomation
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/true_automation`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ **true_automation** gem enables awesome TrueAutomation.IO features for Capybara, Watir or Ruby-based Selenium projects.
4
+
5
+ ## Setup
4
6
 
5
- TODO: Delete this and the text above, and describe your gem
7
+ **true_automation** gem provides helper DSL method, that can be used instead of Selenium/Capybara locators.
8
+ Initial setup aim is to make `ta` method visible for your code.
6
9
 
7
- ## Installation
10
+ You need **trueautomation** npm package installed globally first. It requires NodeJS 9+.
11
+ We recommend to use [nvm](https://github.com/creationix/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows)
12
+ to install Node.
8
13
 
9
- Add this line to your application's Gemfile:
14
+ When right version of Node is installed run the following command:
10
15
 
11
- ```ruby
12
- gem 'true_automation'
13
- ```
16
+ $ npm install -g trueautomation
14
17
 
15
- And then execute:
16
18
 
17
- $ bundle
19
+ ### Automatic Setup
18
20
 
19
- Or install it yourself as:
21
+ Run `trueautomation init` inside your project directory. TrueAutomation installer automatically detects technology used
22
+ in your project. Currently we support Capybara/RSpec automatic setup only.
20
23
 
21
- $ gem install true_automation
24
+ #### Capybara/RSpec
22
25
 
23
- ## Usage
26
+ For Capybara/RSpec projects TrueAutomation installer adds **true_automation** gem to the Gemfile, and includes TrueAutomation
27
+ DSL to `rspec_helper.rb`.
24
28
 
25
- TODO: Write usage instructions here
29
+ #### Other
26
30
 
27
- ## Development
31
+ For other Ruby-based stacks installer just adds **true_automation** gem to the Gemfile. Check *Manual Setup* section for
32
+ setup guide.
28
33
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
34
+ ### Manual Setup
30
35
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
36
+ Add this line to your application's Gemfile:
32
37
 
33
- ## Contributing
38
+ ```ruby
39
+ gem 'true_automation'
40
+ ```
34
41
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/true_automation. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
42
+ And then execute:
43
+
44
+ $ bundle install
45
+
46
+ Add TrueAutomation DSL to your test file
47
+
48
+ ```ruby
49
+ require 'true_automation/dsl'
50
+ ```
51
+
52
+ And include DSL into your class or just as the first line after `require` section.
53
+
54
+ ```ruby
55
+ include TrueAutomation::DSL
56
+ ```
57
+
58
+ ## Usage
36
59
 
37
- ## License
60
+ Object is found by initial locator during the first run. We use advanced html tree and attributes analyzing algorithm which can find the object even if locator has been changed (id/classes are regenerated or HTML slightly changed).
38
61
 
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
62
+ The gem provides helper method to use TrueAutomation.IO Smart Locators instead of Selenium or Capybara locators.
40
63
 
41
- ## Code of Conduct
64
+ To record an element for the first time use `ta(ta_name, initial_locator)` syntax.
42
65
 
43
- Everyone interacting in the TrueAutomation project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/true_automation/blob/master/CODE_OF_CONDUCT.md).
66
+ | Parameter | Description |
67
+ |-----------------|-------------------------------------------------------------|
68
+ |*ta_name* | is TrueAutomation Element name. We recommend to use namespaced syntax. E.g. _pageName:widgetName:elementName_ |
69
+ |*initial_locator*| is Selenium/Capybara locator to use to find element for the first time. If you change initial locator in your code, TrueAutomation element record will be rewritten during next test run |
70
+
71
+ For example:
72
+
73
+ ```ruby
74
+ find(:xpath, ta('true:automation:name', '//initialXpathLocator'))
75
+ find(:css, ta('true:automation:name', '.initialCSSSelector'))
76
+ click(ta('true:automation:name', 'Login'))
77
+ ```
@@ -1,3 +1,3 @@
1
1
  module TrueAutomation
2
- VERSION = '0.1.0'
2
+ VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: true_automation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - TrueAutomation.IO
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-13 00:00:00.000000000 Z
11
+ date: 2018-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler