true_automation 0.3.10 → 0.3.13

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: 0c88f7624d65414110e908748e2c555cf44c6dec
4
- data.tar.gz: cccac43382edf374a3342fd4117c731f7388ab99
3
+ metadata.gz: bc8addf11611006b816025e621c2f834b336123e
4
+ data.tar.gz: 786bbb59df52dd5861c5747710c454dcb2319745
5
5
  SHA512:
6
- metadata.gz: 8c8468515e3af68b74252839306bcb9f6c51b571734fc230009ba9401eddf3d579e8930223973e544f908f0e34b65b0efcbea41c67c2ff65cee256c4b59ba0a8
7
- data.tar.gz: 5d90704323c36d2690d5edce06d911854093741e2619a4d7c4b26fcc4314d7700466922e9396865467f4d86150cace420bf41d6affc06b71f5ede12b26eaf4c5
6
+ metadata.gz: 4d514c1d6c4ee7219ce3524b71ea56ef4a5bad3b2c5e28576d93e06192bb4b88d33ce3517e18c05a485e18c1774c762984454b1d58902f2aef0fb221ac121b99
7
+ data.tar.gz: aae9a75c3e6d815091302576d64928d760be9d38586d2eaeaa49de1593b8b5154e78bce1831a44ab6371bc4acb65988a2edcc745dd553525bd79dd78239a8c90
data/README.md CHANGED
@@ -106,6 +106,18 @@ Add TrueAutomation DSL to your test file
106
106
  include TrueAutomation::DSL
107
107
  ```
108
108
 
109
+ ### Remote webdriver support
110
+
111
+ TrueAutomation.IO client can be used with default embedded ChromeDriver or with any remote WebDriver. You can choose which driver to use when configuring project with `trueautomation init`.
112
+
113
+ To configure remote WebDriver pass WebDriver URL as TrueAutomationDriver constructor option:
114
+
115
+ ```ruby
116
+ TrueAutomation::Driver::Capybara.new(app, browser: :remote, url: 'http://remote_driver_url:9515')
117
+ ```
118
+
119
+ Don't forget to pass `browser: :remote` with `url:`.
120
+
109
121
  ## Usage
110
122
 
111
123
  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).
@@ -10,12 +10,21 @@ module TrueAutomation
10
10
 
11
11
  @ta_client = TrueAutomation::Client.new
12
12
 
13
- capabilities = options.nil? ? nil : options[:desired_capabilities]
13
+ options ||= {}
14
+ ta_url = options[:ta_url] || "http://localhost:#{@port}/"
15
+
16
+ capabilities = options[:desired_capabilities]
14
17
  capabilities ||= {}
15
- capabilities[:browser] = :chrome
18
+
19
+ if options and options[:browser] == :remote
20
+ raise 'Remote driver URL is not specified' unless options[:url]
21
+ capabilities[:taRemoteUrl] = options[:url]
22
+ else
23
+ capabilities[:browser] = :chrome
24
+ end
16
25
 
17
26
  @options.merge!(browser: :remote,
18
- url: "http://localhost:#{@port}/",
27
+ url: ta_url,
19
28
  desired_capabilities: capabilities)
20
29
  end
21
30
 
@@ -1,3 +1,3 @@
1
1
  module TrueAutomation
2
- VERSION = '0.3.10'
2
+ VERSION = '0.3.13'
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.3.10
4
+ version: 0.3.13
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-05-21 00:00:00.000000000 Z
11
+ date: 2018-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler