appium_lib_core 3.0.2 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +7 -2
  3. data/CHANGELOG.md +9 -0
  4. data/lib/appium_lib_core.rb +14 -0
  5. data/lib/appium_lib_core/android.rb +14 -0
  6. data/lib/appium_lib_core/android/device.rb +14 -0
  7. data/lib/appium_lib_core/android/device/auth_finger_print.rb +14 -0
  8. data/lib/appium_lib_core/android/device/clipboard.rb +14 -0
  9. data/lib/appium_lib_core/android/device/emulator.rb +14 -0
  10. data/lib/appium_lib_core/android/device/network.rb +14 -0
  11. data/lib/appium_lib_core/android/device/performance.rb +14 -0
  12. data/lib/appium_lib_core/android/device/screen.rb +14 -0
  13. data/lib/appium_lib_core/android/espresso/bridge.rb +14 -0
  14. data/lib/appium_lib_core/android/uiautomator1/bridge.rb +14 -0
  15. data/lib/appium_lib_core/android/uiautomator2/bridge.rb +14 -0
  16. data/lib/appium_lib_core/android/uiautomator2/device.rb +14 -0
  17. data/lib/appium_lib_core/android/uiautomator2/device/battery.rb +14 -0
  18. data/lib/appium_lib_core/android_espresso.rb +14 -0
  19. data/lib/appium_lib_core/android_uiautomator2.rb +14 -0
  20. data/lib/appium_lib_core/common.rb +14 -0
  21. data/lib/appium_lib_core/common/base.rb +14 -0
  22. data/lib/appium_lib_core/common/base/bridge.rb +15 -1
  23. data/lib/appium_lib_core/common/base/bridge/mjsonwp.rb +14 -0
  24. data/lib/appium_lib_core/common/base/bridge/w3c.rb +14 -0
  25. data/lib/appium_lib_core/common/base/capabilities.rb +14 -0
  26. data/lib/appium_lib_core/common/base/command.rb +14 -0
  27. data/lib/appium_lib_core/common/base/driver.rb +16 -2
  28. data/lib/appium_lib_core/common/base/http_default.rb +14 -0
  29. data/lib/appium_lib_core/common/base/platform.rb +14 -0
  30. data/lib/appium_lib_core/common/base/screenshot.rb +14 -0
  31. data/lib/appium_lib_core/common/base/search_context.rb +14 -0
  32. data/lib/appium_lib_core/common/command.rb +14 -0
  33. data/lib/appium_lib_core/common/command/common.rb +77 -63
  34. data/lib/appium_lib_core/common/command/mjsonwp.rb +15 -1
  35. data/lib/appium_lib_core/common/command/w3c.rb +30 -16
  36. data/lib/appium_lib_core/common/device/app_management.rb +14 -0
  37. data/lib/appium_lib_core/common/device/app_state.rb +14 -0
  38. data/lib/appium_lib_core/common/device/battery_status.rb +14 -0
  39. data/lib/appium_lib_core/common/device/clipboard_content_type.rb +14 -0
  40. data/lib/appium_lib_core/common/device/context.rb +14 -0
  41. data/lib/appium_lib_core/common/device/device.rb +14 -0
  42. data/lib/appium_lib_core/common/device/device_lock.rb +14 -0
  43. data/lib/appium_lib_core/common/device/file_management.rb +14 -0
  44. data/lib/appium_lib_core/common/device/image_comparison.rb +14 -0
  45. data/lib/appium_lib_core/common/device/ime_actions.rb +14 -0
  46. data/lib/appium_lib_core/common/device/keyboard.rb +14 -0
  47. data/lib/appium_lib_core/common/device/keyevent.rb +14 -0
  48. data/lib/appium_lib_core/common/device/screen_record.rb +14 -0
  49. data/lib/appium_lib_core/common/device/setting.rb +14 -0
  50. data/lib/appium_lib_core/common/device/touch_actions.rb +14 -0
  51. data/lib/appium_lib_core/common/device/value.rb +14 -0
  52. data/lib/appium_lib_core/common/error.rb +14 -0
  53. data/lib/appium_lib_core/common/log.rb +14 -0
  54. data/lib/appium_lib_core/common/logger.rb +14 -0
  55. data/lib/appium_lib_core/common/touch_action/multi_touch.rb +14 -0
  56. data/lib/appium_lib_core/common/touch_action/touch_actions.rb +14 -0
  57. data/lib/appium_lib_core/common/wait.rb +17 -3
  58. data/lib/appium_lib_core/common/wait/timer.rb +14 -0
  59. data/lib/appium_lib_core/common/ws/websocket.rb +14 -0
  60. data/lib/appium_lib_core/device.rb +14 -0
  61. data/lib/appium_lib_core/driver.rb +22 -2
  62. data/lib/appium_lib_core/ios.rb +14 -0
  63. data/lib/appium_lib_core/ios/device.rb +14 -0
  64. data/lib/appium_lib_core/ios/device/clipboard.rb +14 -0
  65. data/lib/appium_lib_core/ios/uiautomation/bridge.rb +14 -0
  66. data/lib/appium_lib_core/ios/uiautomation/device.rb +14 -0
  67. data/lib/appium_lib_core/ios/uiautomation/patch.rb +14 -0
  68. data/lib/appium_lib_core/ios/xcuitest/bridge.rb +14 -0
  69. data/lib/appium_lib_core/ios/xcuitest/device.rb +14 -0
  70. data/lib/appium_lib_core/ios/xcuitest/device/battery.rb +14 -0
  71. data/lib/appium_lib_core/ios/xcuitest/device/performance.rb +14 -0
  72. data/lib/appium_lib_core/ios/xcuitest/device/screen.rb +14 -0
  73. data/lib/appium_lib_core/ios_xcuitest.rb +14 -0
  74. data/lib/appium_lib_core/patch.rb +14 -0
  75. data/lib/appium_lib_core/version.rb +16 -2
  76. data/release_notes.md +6 -0
  77. data/script/commands.rb +15 -1
  78. metadata +2 -2
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Core
3
17
  module Device
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  require 'uri'
2
16
 
3
17
  module Appium
@@ -314,6 +328,12 @@ module Appium
314
328
  # @core = Appium::Core.for(opts) # create a core driver with `opts` and extend methods into `self`
315
329
  # @driver = @core.start_driver server_url: "http://127.0.0.1:8000/wd/hub"
316
330
  #
331
+ # # Attach custom HTTP client
332
+ # @driver = @core.start_driver server_url: "http://127.0.0.1:8000/wd/hub",
333
+ # http_client_ops: { http_client: Your:Http:Client.new,
334
+ # open_timeout: 1_000,
335
+ # read_timeout: 1_000 }
336
+ #
317
337
 
318
338
  def start_driver(server_url: nil,
319
339
  http_client_ops: { http_client: nil, open_timeout: 999_999, read_timeout: 999_999 })
@@ -353,7 +373,7 @@ module Appium
353
373
  private
354
374
 
355
375
  def create_http_client(http_client: nil, open_timeout: nil, read_timeout: nil)
356
- @http_client ||= http_client || Appium::Core::Base::Http::Default.new
376
+ @http_client = http_client || Appium::Core::Base::Http::Default.new
357
377
 
358
378
  # open_timeout and read_timeout are explicit wait.
359
379
  @http_client.open_timeout = open_timeout if open_timeout
@@ -586,7 +606,7 @@ module Appium
586
606
 
587
607
  # @private
588
608
  def write_session_id(session_id, export_path = '/tmp/appium_lib_session')
589
- export_path.tr!('/', '\\') if ::Appium::Core::Base.platform.windows?
609
+ export_path = export_path.tr('/', '\\') if ::Appium::Core::Base.platform.windows?
590
610
  File.write(export_path, session_id)
591
611
  rescue IOError => e
592
612
  ::Appium::Logger.warn e
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  # loaded in common/driver.rb
2
16
  require_relative 'ios/device'
3
17
 
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  require_relative 'device/clipboard'
2
16
 
3
17
  module Appium
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  require 'base64'
2
16
 
3
17
  module Appium
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Core
3
17
  module Ios
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Core
3
17
  module Ios
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Core
3
17
  module Ios
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Core
3
17
  module Ios
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  require_relative 'device/performance'
2
16
  require_relative 'device/screen'
3
17
  require_relative 'device/battery'
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Core
3
17
  module Ios
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Core
3
17
  module Ios
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Core
3
17
  module Ios
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  # loaded in common/driver.rb
2
16
  require_relative 'ios/device'
3
17
 
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  # rubocop:disable Style/ClassAndModuleChildren
2
16
  module Appium
3
17
  module Core
@@ -1,6 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  module Appium
2
16
  module Core
3
- VERSION = '3.0.2'.freeze unless defined? ::Appium::Core::VERSION
4
- DATE = '2019-03-07'.freeze unless defined? ::Appium::Core::DATE
17
+ VERSION = '3.0.3' unless defined? ::Appium::Core::VERSION
18
+ DATE = '2019-03-11' unless defined? ::Appium::Core::DATE
5
19
  end
6
20
  end
data/release_notes.md CHANGED
@@ -1,3 +1,9 @@
1
+ #### v3.0.3 2019-03-11
2
+
3
+ - [b2dc0d9](https://github.com/appium/ruby_lib_core/commit/b2dc0d9ce3ef156da0b40b5e70ec0abd9c493d5a) Release 3.0.3
4
+ - [fd2cbde](https://github.com/appium/ruby_lib_core/commit/fd2cbde5466a144ce8dccfc6cf330b969bcc8fd3) Bump target rubyversion 2.3 rubocop (#198)
5
+
6
+
1
7
  #### v3.0.2 2019-03-07
2
8
 
3
9
  - [e2f6010](https://github.com/appium/ruby_lib_core/commit/e2f601086f9daf377270a780d5300687be37ada0) Release 3.0.2
data/script/commands.rb CHANGED
@@ -1,3 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  require 'net/http'
2
16
  require './lib/appium_lib_core'
3
17
 
@@ -44,7 +58,7 @@ module Script
44
58
  # @private
45
59
  HTTP_METHOD_MATCH = /GET:|POST:|DELETE:|PUT:|PATCH:/.freeze
46
60
  # @private
47
- WD_HUB_PREFIX_MATCH = "'/wd/hub/".freeze
61
+ WD_HUB_PREFIX_MATCH = "'/wd/hub/"
48
62
 
49
63
  # Read routes.js and set the values in @spec_commands
50
64
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_lib_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuaki MATSUO
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-07 00:00:00.000000000 Z
11
+ date: 2019-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver