testa_appium_driver 0.1.12 → 0.1.13
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.
- checksums.yaml +4 -4
 - data/.gitignore +3 -1
 - data/README.md +34 -10
 - data/lib/testa_appium_driver/common/helpers.rb +1 -1
 - data/lib/testa_appium_driver/driver.rb +3 -1
 - data/lib/testa_appium_driver/version.rb +1 -1
 - data/testa_appium_driver.gemspec +1 -1
 - data/testa_appium_driver.iml +13 -0
 - metadata +4 -4
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 5f2c8a8e6fd795af67dac4592eaffc07d186102a19b9ffec5bce2c390ebefbeb
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 97a681eeb0170cd7563a83a9385d12b15af0af4d6fbbec535f7421d8fa0d8c49
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 5602bfd12d6c4473b09a5454f20f246e51924f791974047951b2923276464184bf96a61895847bc69650d59582eb768e8b2e8a233876c3a8b13b1bba0a533ec7
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 0c20fa50c39cab7adb5462247a4eb1aeb6e9c8edaa1b6c47dd1e2894b8bfe6e4b12bae35ef7f179815dc37dfff34bfc393d3342c1153aa1fc8d45226f0863173
         
     | 
    
        data/.gitignore
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -135,11 +135,11 @@ The command marks the last selector as scrollable container. 
     | 
|
| 
       135 
135 
     | 
    
         | 
| 
       136 
136 
     | 
    
         
             
            #### Example 4
         
     | 
| 
       137 
137 
     | 
    
         
             
            ```ruby
         
     | 
| 
       138 
     | 
    
         
            -
            driver.buttons. 
     | 
| 
      
 138 
     | 
    
         
            +
            driver.buttons.scroll_each do |element|
         
     | 
| 
       139 
139 
     | 
    
         
             
              puts element.text
         
     | 
| 
       140 
140 
     | 
    
         
             
            end
         
     | 
| 
       141 
141 
     | 
    
         
             
            ```
         
     | 
| 
       142 
     | 
    
         
            -
            The ` 
     | 
| 
      
 142 
     | 
    
         
            +
            The `scroll_each` method is one of the scrollable actions. It will start from the beginning of the scrollable container,
         
     | 
| 
       143 
143 
     | 
    
         
             
            in this case `driver.scrollable`, and find every button in the screen. It will scroll the page until the end of scrollable 
         
     | 
| 
       144 
144 
     | 
    
         
             
            container is reached and all buttons are found.
         
     | 
| 
       145 
145 
     | 
    
         | 
| 
         @@ -227,7 +227,7 @@ Adjacent selectors 
     | 
|
| 
       227 
227 
     | 
    
         
             
            - following_siblings
         
     | 
| 
       228 
228 
     | 
    
         | 
| 
       229 
229 
     | 
    
         | 
| 
       230 
     | 
    
         
            -
             
     | 
| 
      
 230 
     | 
    
         
            +
            Element Selector arguments
         
     | 
| 
       231 
231 
     | 
    
         
             
            - id
         
     | 
| 
       232 
232 
     | 
    
         
             
            - long_clickable
         
     | 
| 
       233 
233 
     | 
    
         
             
            - desc
         
     | 
| 
         @@ -244,6 +244,18 @@ Class Selector arguments 
     | 
|
| 
       244 
244 
     | 
    
         
             
            - selected
         
     | 
| 
       245 
245 
     | 
    
         
             
            - scrollable
         
     | 
| 
       246 
246 
     | 
    
         | 
| 
      
 247 
     | 
    
         
            +
             
     | 
| 
      
 248 
     | 
    
         
            +
            - image
         
     | 
| 
      
 249 
     | 
    
         
            +
            - imageMatchThreshold (option for image selector)
         
     | 
| 
      
 250 
     | 
    
         
            +
            - fixImageFindScreenshotDims (option for image selector)
         
     | 
| 
      
 251 
     | 
    
         
            +
            - fixImageTemplateSize (option for image selector)
         
     | 
| 
      
 252 
     | 
    
         
            +
            - fixImageTemplateScale (option for image selector)
         
     | 
| 
      
 253 
     | 
    
         
            +
            - defaultImageTemplateScale (option for image selector)
         
     | 
| 
      
 254 
     | 
    
         
            +
            - checkForImageElementStaleness (option for image selector)
         
     | 
| 
      
 255 
     | 
    
         
            +
            - autoUpdateImageElementPosition (option for image selector)
         
     | 
| 
      
 256 
     | 
    
         
            +
            - imageElementTapStrategy (option for image selector)
         
     | 
| 
      
 257 
     | 
    
         
            +
            - getMatchedImageResult (option for image selector)
         
     | 
| 
      
 258 
     | 
    
         
            +
             
     | 
| 
       247 
259 
     | 
    
         
             
            ### Attributes
         
     | 
| 
       248 
260 
     | 
    
         
             
            - text
         
     | 
| 
       249 
261 
     | 
    
         
             
            - package
         
     | 
| 
         @@ -301,17 +313,29 @@ Adjacent selectors 
     | 
|
| 
       301 
313 
     | 
    
         
             
            - following_sibling
         
     | 
| 
       302 
314 
     | 
    
         
             
            - following_siblings
         
     | 
| 
       303 
315 
     | 
    
         | 
| 
       304 
     | 
    
         
            -
             
     | 
| 
      
 316 
     | 
    
         
            +
            Element Selector arguments
         
     | 
| 
      
 317 
     | 
    
         
            +
            - name, id
         
     | 
| 
       305 
318 
     | 
    
         
             
            - enabled
         
     | 
| 
       306 
319 
     | 
    
         
             
            - type, class
         
     | 
| 
       307 
320 
     | 
    
         
             
            - label
         
     | 
| 
       308 
321 
     | 
    
         
             
            - width
         
     | 
| 
       309 
322 
     | 
    
         
             
            - height
         
     | 
| 
       310 
323 
     | 
    
         
             
            - visible
         
     | 
| 
       311 
     | 
    
         
            -
            - name, id
         
     | 
| 
       312 
324 
     | 
    
         
             
            - value
         
     | 
| 
       313 
325 
     | 
    
         | 
| 
       314 
326 
     | 
    
         | 
| 
      
 327 
     | 
    
         
            +
            - image
         
     | 
| 
      
 328 
     | 
    
         
            +
            - imageMatchThreshold (option for image selector)
         
     | 
| 
      
 329 
     | 
    
         
            +
            - fixImageFindScreenshotDims (option for image selector)
         
     | 
| 
      
 330 
     | 
    
         
            +
            - fixImageTemplateSize (option for image selector)
         
     | 
| 
      
 331 
     | 
    
         
            +
            - fixImageTemplateScale (option for image selector)
         
     | 
| 
      
 332 
     | 
    
         
            +
            - defaultImageTemplateScale (option for image selector)
         
     | 
| 
      
 333 
     | 
    
         
            +
            - checkForImageElementStaleness (option for image selector)
         
     | 
| 
      
 334 
     | 
    
         
            +
            - autoUpdateImageElementPosition (option for image selector)
         
     | 
| 
      
 335 
     | 
    
         
            +
            - imageElementTapStrategy (option for image selector)
         
     | 
| 
      
 336 
     | 
    
         
            +
            - getMatchedImageResult (option for image selector)
         
     | 
| 
      
 337 
     | 
    
         
            +
             
     | 
| 
      
 338 
     | 
    
         
            +
             
     | 
| 
       315 
339 
     | 
    
         
             
            ## Attributes
         
     | 
| 
       316 
340 
     | 
    
         
             
            - accessibility_container
         
     | 
| 
       317 
341 
     | 
    
         
             
            - accessible?
         
     | 
| 
         @@ -328,11 +352,11 @@ Type Selector arguments 
     | 
|
| 
       328 
352 
     | 
    
         
             
            - visible?
         
     | 
| 
       329 
353 
     | 
    
         | 
| 
       330 
354 
     | 
    
         
             
            # Scroll actions
         
     | 
| 
       331 
     | 
    
         
            -
            -  
     | 
| 
       332 
     | 
    
         
            -
            -  
     | 
| 
       333 
     | 
    
         
            -
            -  
     | 
| 
       334 
     | 
    
         
            -
            -  
     | 
| 
       335 
     | 
    
         
            -
            -  
     | 
| 
      
 355 
     | 
    
         
            +
            - scroll_each
         
     | 
| 
      
 356 
     | 
    
         
            +
            - scroll_each_down
         
     | 
| 
      
 357 
     | 
    
         
            +
            - scroll_each_up
         
     | 
| 
      
 358 
     | 
    
         
            +
            - scroll_each_left
         
     | 
| 
      
 359 
     | 
    
         
            +
            - scroll_each_right
         
     | 
| 
       336 
360 
     | 
    
         
             
            - align! (if does not exist, will scroll to find)
         
     | 
| 
       337 
361 
     | 
    
         
             
            - align_top! (if does not exist, will scroll to find)
         
     | 
| 
       338 
362 
     | 
    
         
             
            - align_bottom! (if does not exist, will scroll to find)
         
     | 
| 
         @@ -101,7 +101,7 @@ module TestaAppiumDriver 
     | 
|
| 
       101 
101 
     | 
    
         
             
                      command = "#{command}*"
         
     | 
| 
       102 
102 
     | 
    
         
             
                    end
         
     | 
| 
       103 
103 
     | 
    
         | 
| 
       104 
     | 
    
         
            -
             
     | 
| 
      
 104 
     | 
    
         
            +
                    # TODO: with new uiautomator sever you can use matches to look with regex instead of contains
         
     | 
| 
       105 
105 
     | 
    
         
             
                    command = "#{ command }[@resource-id=\"#{ %(#{ id }) }\"]" if  id &&  id.kind_of?(String)
         
     | 
| 
       106 
106 
     | 
    
         
             
                    command = "#{ command }[contains(@resource-id, \"#{ %(#{ id.source }) }\")]" if  id &&  id.kind_of?(Regexp)
         
     | 
| 
       107 
107 
     | 
    
         
             
                    command = "#{ command }[@content-desc=\"#{ %(#{hash[:desc] }) }\"]" if hash[:desc] && hash[:desc].kind_of?(String)
         
     | 
| 
         @@ -27,6 +27,8 @@ module TestaAppiumDriver 
     | 
|
| 
       27 
27 
     | 
    
         
             
                # - default_find_strategy: default strategy to be used for finding elements. Available strategies :uiautomator or :xpath
         
     | 
| 
       28 
28 
     | 
    
         
             
                # - default_scroll_strategy: default strategy to be used for scrolling. Available strategies: :uiautomator(android only), :w3c
         
     | 
| 
       29 
29 
     | 
    
         
             
                def initialize(opts = {})
         
     | 
| 
      
 30 
     | 
    
         
            +
                  opts[:shouldEnforceXpath1] = false
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
       30 
32 
     | 
    
         
             
                  @testa_opts = opts[:testa_appium_driver] || {}
         
     | 
| 
       31 
33 
     | 
    
         | 
| 
       32 
34 
     | 
    
         
             
                  core = Appium::Core.for(opts)
         
     | 
| 
         @@ -159,7 +161,7 @@ module TestaAppiumDriver 
     | 
|
| 
       159 
161 
     | 
    
         
             
                def disable_wait_for_idle
         
     | 
| 
       160 
162 
     | 
    
         
             
                  if @device == :android
         
     | 
| 
       161 
163 
     | 
    
         
             
                    @wait_for_idle_timeout = @driver.settings.get["waitForIdleTimeout"]
         
     | 
| 
       162 
     | 
    
         
            -
                    @driver.update_settings({waitForIdleTimeout:  
     | 
| 
      
 164 
     | 
    
         
            +
                    @driver.update_settings({waitForIdleTimeout: 0})
         
     | 
| 
       163 
165 
     | 
    
         
             
                  end
         
     | 
| 
       164 
166 
     | 
    
         
             
                end
         
     | 
| 
       165 
167 
     | 
    
         | 
    
        data/testa_appium_driver.gemspec
    CHANGED
    
    | 
         @@ -30,7 +30,7 @@ Gem::Specification.new do |spec| 
     | 
|
| 
       30 
30 
     | 
    
         
             
              spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
         
     | 
| 
       31 
31 
     | 
    
         
             
              spec.require_paths = ["lib"]
         
     | 
| 
       32 
32 
     | 
    
         | 
| 
       33 
     | 
    
         
            -
              spec.add_runtime_dependency "appium_lib_core", ["=  
     | 
| 
      
 33 
     | 
    
         
            +
              spec.add_runtime_dependency "appium_lib_core", ["= 5.1.0"]
         
     | 
| 
       34 
34 
     | 
    
         
             
              spec.add_runtime_dependency "json", ["~> 2.3"]
         
     | 
| 
       35 
35 
     | 
    
         | 
| 
       36 
36 
     | 
    
         
             
              spec.add_development_dependency "rubocop", ["= 1.19.0"]
         
     | 
    
        data/testa_appium_driver.iml
    CHANGED
    
    | 
         @@ -5,9 +5,13 @@ 
     | 
|
| 
       5 
5 
     | 
    
         
             
                <content url="file://$MODULE_DIR$" />
         
     | 
| 
       6 
6 
     | 
    
         
             
                <orderEntry type="jdk" jdkName="RVM: ruby-2.7.0" jdkType="RUBY_SDK" />
         
     | 
| 
       7 
7 
     | 
    
         
             
                <orderEntry type="sourceFolder" forTests="false" />
         
     | 
| 
      
 8 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="appium_lib_core (v4.7.0, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
       8 
9 
     | 
    
         
             
                <orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
       9 
10 
     | 
    
         
             
                <orderEntry type="library" scope="PROVIDED" name="bundler (v2.3.4, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
      
 11 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="childprocess (v3.0.0, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
       10 
12 
     | 
    
         
             
                <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.5.0, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
      
 13 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="eventmachine (v1.2.7, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
      
 14 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="faye-websocket (v0.11.1, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
       11 
15 
     | 
    
         
             
                <orderEntry type="library" scope="PROVIDED" name="json (v2.6.1, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
       12 
16 
     | 
    
         
             
                <orderEntry type="library" scope="PROVIDED" name="parallel (v1.21.0, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
       13 
17 
     | 
    
         
             
                <orderEntry type="library" scope="PROVIDED" name="parser (v3.1.0.0, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
         @@ -23,6 +27,15 @@ 
     | 
|
| 
       23 
27 
     | 
    
         
             
                <orderEntry type="library" scope="PROVIDED" name="rubocop (v1.25.0, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
       24 
28 
     | 
    
         
             
                <orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.15.1, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
       25 
29 
     | 
    
         
             
                <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.11.0, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
      
 30 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="rubyzip (v2.3.2, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
      
 31 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="selenium-webdriver (v3.142.7, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
       26 
32 
     | 
    
         
             
                <orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.1.0, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
      
 33 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.7.5, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
      
 34 
     | 
    
         
            +
                <orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.5, RVM: ruby-2.7.0) [gem]" level="application" />
         
     | 
| 
      
 35 
     | 
    
         
            +
              </component>
         
     | 
| 
      
 36 
     | 
    
         
            +
              <component name="RakeTasksCache">
         
     | 
| 
      
 37 
     | 
    
         
            +
                <option name="myRootTask">
         
     | 
| 
      
 38 
     | 
    
         
            +
                  <RakeTaskImpl id="rake" />
         
     | 
| 
      
 39 
     | 
    
         
            +
                </option>
         
     | 
| 
       27 
40 
     | 
    
         
             
              </component>
         
     | 
| 
       28 
41 
     | 
    
         
             
            </module>
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: testa_appium_driver
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.13
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - karlo.razumovic
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2022-01- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2022-01-29 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: appium_lib_core
         
     | 
| 
         @@ -16,14 +16,14 @@ dependencies: 
     | 
|
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
17 
     | 
    
         
             
                - - '='
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version:  
     | 
| 
      
 19 
     | 
    
         
            +
                    version: 5.1.0
         
     | 
| 
       20 
20 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       21 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       22 
22 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       23 
23 
     | 
    
         
             
                requirements:
         
     | 
| 
       24 
24 
     | 
    
         
             
                - - '='
         
     | 
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
     | 
    
         
            -
                    version:  
     | 
| 
      
 26 
     | 
    
         
            +
                    version: 5.1.0
         
     | 
| 
       27 
27 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       28 
28 
     | 
    
         
             
              name: json
         
     | 
| 
       29 
29 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     |