eyes_capybara 6.4.2 → 6.4.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c8c44f002a65daf2ef2bd08f1ad68d9da7241ec43dd5f195d60d0e28e89bff4
4
- data.tar.gz: 1ec1070b2bab6525cd105f60d86fa4f03fbb599bfe3c15ff6507c434f3000256
3
+ metadata.gz: 1c82895ad6fcaadd8e59611a1e763ba210dd463cc526a47de332a1127f8e3db5
4
+ data.tar.gz: 3babb79c9d6535976e98b6fd2203f30d877a4c08fe22d1093859e298dfc1c5d3
5
5
  SHA512:
6
- metadata.gz: 02c1b1a86b47340d106f9057142b108cb3c3f03fddcb70be042a9e65eb81db776f41fc93c3e9270af13c60e761c060227686f0b58a85b4c5ea164228bc65701a
7
- data.tar.gz: 043f0076b549f476ac5e0681693aea7c39f83e6229d04f863c9baa8a50e7314aeb6bc8d6aa9da8111762b7511e47e1a1ecfaf61455df67bd481c667ac8049878
6
+ metadata.gz: 47612f9b2e9b16a074857ee20ee798518c98c1ec2b2a5ba502be63ecc7f12271fc849a249ecf0bba2f0995ed9dfd4835a3aa91528f319b84c32329905e1925a3
7
+ data.tar.gz: c00afd97f3c7ca9a9187a5f3f96ac5b8066982c67a9a5bd0448c28ff9ea89be83baff8450a09ee729c19a55ee246744d25756a6be8ce64b956ba2881402c29f7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,106 @@
1
1
  # Changelog
2
2
 
3
+ ## [6.4.4](https://github.com/Applitools-Dev/sdk/compare/ruby/eyes_capybara@6.4.3...ruby/eyes_capybara@6.4.4) (2025-06-15)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * @applitools/dom-snapshot bumped to 4.11.22
9
+ #### Bug Fixes
10
+
11
+ * css media query group conditions | FLD-3151 ([#3023](https://github.com/Applitools-Dev/sdk/issues/3023)) ([56ec107](https://github.com/Applitools-Dev/sdk/commit/56ec107bcda6a5a330d19c278267d73de5d86d8b))
12
+
13
+
14
+
15
+ * @applitools/nml-client bumped to 1.9.5
16
+ #### Bug Fixes
17
+
18
+ * nml-client depends on core-base ([#2995](https://github.com/Applitools-Dev/sdk/issues/2995)) ([1f7cf69](https://github.com/Applitools-Dev/sdk/commit/1f7cf6930709a40a498dd1f525132648aa593af0))
19
+
20
+
21
+
22
+ * @applitools/tunnel-client bumped to 1.8.0
23
+ #### Features
24
+
25
+ * update build script to include individual zip creation ([#3008](https://github.com/Applitools-Dev/sdk/issues/3008)) ([46a0cfc](https://github.com/Applitools-Dev/sdk/commit/46a0cfcc472ab69384560095d90a7fa58b4b9186))
26
+
27
+
28
+
29
+ * @applitools/ufg-client bumped to 1.16.12
30
+ #### Bug Fixes
31
+
32
+ * remove safari-early-access browser version for js sdks | AD-10226 ([#3034](https://github.com/Applitools-Dev/sdk/issues/3034)) ([7ca09f5](https://github.com/Applitools-Dev/sdk/commit/7ca09f5c0c271570142058ea766533b86434dc2e))
33
+
34
+
35
+
36
+ * @applitools/core-base bumped to 1.25.4
37
+ #### Bug Fixes
38
+
39
+ * Differentiate Between Invalid and Missing API Key Errors ([6ac17d4](https://github.com/Applitools-Dev/sdk/commit/6ac17d40d7aff45b3de5c949dc7d4673b9739bfd))
40
+ * export issues for ts js with legacy solution ([#3016](https://github.com/Applitools-Dev/sdk/issues/3016)) ([a3a9daf](https://github.com/Applitools-Dev/sdk/commit/a3a9daf9c3361bb1f253499c1335a1434ec520d1))
41
+
42
+
43
+
44
+ * @applitools/core bumped to 4.40.0
45
+ #### Features
46
+
47
+ * update build script to include individual zip creation ([#3008](https://github.com/Applitools-Dev/sdk/issues/3008)) ([46a0cfc](https://github.com/Applitools-Dev/sdk/commit/46a0cfcc472ab69384560095d90a7fa58b4b9186))
48
+
49
+
50
+ #### Bug Fixes
51
+
52
+ * css media query group conditions | FLD-3151 ([#3023](https://github.com/Applitools-Dev/sdk/issues/3023)) ([56ec107](https://github.com/Applitools-Dev/sdk/commit/56ec107bcda6a5a330d19c278267d73de5d86d8b))
53
+ * export issues for ts js with legacy solution ([#3016](https://github.com/Applitools-Dev/sdk/issues/3016)) ([a3a9daf](https://github.com/Applitools-Dev/sdk/commit/a3a9daf9c3361bb1f253499c1335a1434ec520d1))
54
+ * extractLatestCommitInfo | FLD-3217 ([#3039](https://github.com/Applitools-Dev/sdk/issues/3039)) ([3f72a23](https://github.com/Applitools-Dev/sdk/commit/3f72a230fa0166046ea85ae004cfb544de86e628))
55
+ * handle error when sending started message in tunnel manager server ([#3019](https://github.com/Applitools-Dev/sdk/issues/3019)) ([2cdaad8](https://github.com/Applitools-Dev/sdk/commit/2cdaad896fd679187449b69abe529b006f6255ee))
56
+
57
+
58
+
59
+ * @applitools/ec-client bumped to 1.10.15
60
+
61
+ * eyes_core bumped to 6.7.2
62
+
63
+ * @applitools/test-server bumped to 1.2.3
64
+ #### Bug Fixes
65
+
66
+ * basic auth protected resources | FLD-2761 | FMRI-120 ([#2444](https://github.com/Applitools-Dev/sdk/issues/2444)) ([b48cf49](https://github.com/Applitools-Dev/sdk/commit/b48cf49dec50bbf1ed2ba111608a48cf09962565))
67
+ * export issues for ts js with legacy solution ([#3016](https://github.com/Applitools-Dev/sdk/issues/3016)) ([a3a9daf](https://github.com/Applitools-Dev/sdk/commit/a3a9daf9c3361bb1f253499c1335a1434ec520d1))
68
+ * storybook navigation timeouts ([#2701](https://github.com/Applitools-Dev/sdk/issues/2701)) ([64e3a40](https://github.com/Applitools-Dev/sdk/commit/64e3a40a524ae76ec457ae9c2d1170fbaea5e982))
69
+
70
+
71
+
72
+ * @applitools/req bumped to 1.7.13
73
+
74
+ * @applitools/dom-capture bumped to 11.5.6
75
+
76
+ * @applitools/spec-driver-webdriver bumped to 1.2.6
77
+
78
+ * @applitools/screenshoter bumped to 3.11.5
79
+
80
+ * eyes_universal bumped to 4.40.0
81
+
82
+ * eyes_selenium bumped to 6.9.2
83
+ #### Bug Fixes
84
+
85
+ * remove safari-early-access browser version (bindings) | AD-10226 ([#3033](https://github.com/Applitools-Dev/sdk/issues/3033)) ([108b805](https://github.com/Applitools-Dev/sdk/commit/108b8051986609fc701a20cee8e39cefd433c19b))
86
+
87
+
88
+
89
+
90
+ ## [6.4.3](https://github.com/Applitools-Dev/sdk/compare/ruby/eyes_capybara@6.4.2...ruby/eyes_capybara@6.4.3) (2025-05-22)
91
+
92
+
93
+ ### Dependencies
94
+
95
+ * eyes_universal bumped to 4.38.0
96
+ #### Features
97
+
98
+ * adding the mac-arm64 binary ([#2975](https://github.com/Applitools-Dev/sdk/issues/2975)) ([95d647f](https://github.com/Applitools-Dev/sdk/commit/95d647ff4a451309d985a786f7cec544d926f0e5))
99
+ * eyes_core bumped to 6.7.1
100
+
101
+ * eyes_selenium bumped to 6.9.1
102
+
103
+
3
104
  ## [6.4.2](https://github.com/Applitools-Dev/sdk/compare/ruby/eyes_capybara@6.4.1...ruby/eyes_capybara@6.4.2) (2025-04-17)
4
105
 
5
106
 
data/LICENSE ADDED
@@ -0,0 +1,26 @@
1
+ - -
2
+ SDK LICENSE AGREEMENT
3
+ IMPORTANT - PLEASE READ CAREFULLY THE TERMS OF THIS LICENSE AGREEMENT ("AGREEMENT"). BY INSTALLING, ACCESSING AND/OR USING THE SOFTWARE (AS DEFINED BELOW), YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT YOU, OR THE COMPANY YOU REPRESENT, ("YOU" OR "LICENSEE") ARE ENTERING INTO A LEGAL AGREEMENT WITH APPLITOOLS LTD. AND ITS AFFILIATES ("APPLITOOLS"), AND HAVE UNDERSTOOD AND AGREE TO COMPLY WITH, AND BE LEGALLY BOUND BY, THE TERMS AND CONDITIONS OF THIS AGREEMENT. YOU HEREBY WAIVE ANY RIGHTS OR REQUIREMENTS UNDER ANY LAWS OR REGULATIONS IN ANY JURISDICTION WHICH REQUIRE AN ORIGINAL (NON-ELECTRONIC) SIGNATURE OR DELIVERY OR RETENTION OF NON-ELECTRONIC RECORDS, TO THE EXTENT PERMITTED UNDER APPLICABLE LAW.
4
+ THE SOFTWARE MAY BE USED SOLELY FOR YOUR PERSONAL, NON-COMMERCIAL PURPOSES. FOR COMMERCIAL PURPOSES PLEASE CONTACT THE REGIONAL APPLITOOLS BUSINESS REPRESENTATIVE.
5
+ 1. Definitions. For purposes of this Agreement, the following capitalized terms shall have the following meaning:
6
+ 1. "Documentation" means the user's guides and technical manuals delivered by Applitools to Licensee.
7
+ 2. "Feedback" means suggestions, comments or feedback (whether orally or in writing) with respect to the Software.
8
+ 3. "Intellectual Property Rights" means all intangible legal rights, titles and interests evidenced by or embodied in all: (i) inventions (regardless of patentability and whether or not reduced to practice), improvements thereto, patents, patent applications, patent disclosures, together with all reissuances, continuations, continuations in part, revisions, extensions and reexaminations thereof; (ii) trademarks, service marks, trade dress, logos, trade names, corporate names, together with translations, adaptations, derivations and combinations thereof, including goodwill associated therewith, and applications, registrations, and renewals in connection therewith; (iii) any work of authorship, regardless of copyrightable, copyrightable works, copyrights (including moral rights), and applications, registrations and renewals in connection therewith; (iv) mask works and applications, registrations and renewals in connection therewith; (v) trade secrets and Confidential Information; and (vi) other proprietary rights and any other similar rights, in each case on a worldwide basis, and copies and tangible embodiments thereof, in whatever form or medium.
9
+ 4. "License" means the right to use the Software pursuant to Section ‎2.1 to this Agreement.
10
+ 5. "Software" means Applitools' software development kit software in object or source code version, Documentation and any updates and upgrade thereto (to the extent delivered).
11
+ 1. License
12
+ 1. Grant of License. Subject to the terms and conditions of this Agreement, Applitools grants You, during the Term, a personal, non-exclusive, non-sublicensable, non-transferable, revocable license to: (i) use the Software solely for Your own personal (non-commercial) use and (ii) use and display Applitools' Marks solely for the purpose of publicizing or advertising that You are using the Software.
13
+ 2. Documentation. Applitools may make available Documentation to Licensee for Licensee to use solely in connection with Licensee's use of the Software during the term of this Agreement. Licensee may print or copy the Documentation as needed for its own purposes provided that all copyright notices are included therein. The Documentation shall be considered the Confidential Information of Applitools.
14
+ 1. Reservation of Rights; Use Restrictions. Other than the rights explicitly granted in this Agreement, Licensee shall have no other rights, express or implied, in the Software. Without limiting the generality of the foregoing, Licensee agrees and undertakes not to: (i) allow any third party to use the Software in any manner, including but not limited to, sell, lease, sublicense or distribute the Software, or any part thereof; (ii) modify, revise, or alter the Software or reverse engineer, decompile, disassemble or otherwise reduce to human-perceivable form the Software's source code; (iii) copy or allow copies of the Software to be made; (iv) remove, alter or obscure any proprietary notice or identification, including copyright, trademark, patent or other notices, contained in or displayed on or via the Software; (v) use the Software to violate any applicable laws, rules or regulations, or for any unlawful, harmful, irresponsible, or inappropriate purpose, or in any manner that breaches this Agreement, and/or (vi) represent that it possesses any proprietary interest in the Software.
15
+ 1. Third Party Software. Licensee acknowledges and agrees that any third party software ("Third Party Software") that provided with the Software is provided under the terms of the license attached/linked thereto or, if no such license is attached, such Third Party Software is provided for free and on "AS IS" basis. Applitools is not liable for any losses or damages which may occur resulting from the use of any Third Party Software. Applitools does not possess any proprietary interest in such Third Party Software.
16
+ 1. Open Source Licenses. The Software includes certain open source code software and materials (as shall be listed in the documentation of the Software) ("Open Source Software") that are subject to their respective open source licenses ("Open Source Licenses"). Such Open Source Licenses contain a list of conditions with respect to warranty, copyright policy and other provisions. By executing this Agreement, Licensee undertakes to strictly comply with the terms and condition of the Open Source Licenses, as may be amended from time to time. In order to comply with the Open Source Licenses, Licensee shall read the respective licenses or notices, such list of Open Source Licenses may be amended from time to time by Applitools, at its sole discretion. In the event of any inconsistencies or conflicting provisions between the provisions of the Open Source Licenses and the provisions of this Agreement, the provisions of the Open Source Licenses shall prevail. Without derogating from the generality of the foregoing, it is clarified that any Open Source Software is provided on an "AS IS" basis, without indemnity or warranty of any kind, whether express or implied. For clarity, the representations and warranties set forth in Section ‎4 hereunder shall not apply to any Open Source Software.
17
+ 1. Title & Ownership. APPLITOOLS DOES NOT SELL OR TRANSFER TITLE IN THE SOFTWARE, OR ANY PART THEREOF, TO LICENSEE. The Documentation, Software (excluding any Open Source Software and Third Party Software therein which are owned by their respective licensors) and/or any copies thereof, including without limitation any derivative works made (regardless of whether such derivative works were made and/or developed pursuant to the request and/or specifications of Licensee, and irrespective of any support and/or assistance Applitools may, will or had received from Licensee, or any third party on its behalf, with respect thereto), as well as any updates or upgrades thereto, if provided to Applitools pursuant to this Agreement, shall remain Applitools' sole and exclusive property. All Intellectual Property Rights evidenced by or embodied in and/or attached/connected/related to the Software, or part thereof, are and shall be owned solely and exclusively by Applitools. Nothing in this Agreement shall constitute a waiver of Applitools' Intellectual Property Rights under any law, or be in any way construed or interpreted as such. It is further agreed that to the extent Licensee provides Applitools with Feedback, Licensee acknowledges that any and all rights, including Intellectual Property Rights in such Feedback shall belong exclusively to Applitools and Licensee hereby irrevocably and unconditionally transfers and assigns to Applitools all intellectual property rights in such Feedback and waives any and all moral rights that Licensee may have in respect thereto. It is further understood that use of Feedback, if any, may be made by Applitools at its sole discretion, and that Applitools in no way shall be obliged to make use of any kind of the Feedback or part thereof.
18
+ 1. Warranty. Applitools warrants that to its knowledge it has the right to grant the license under this Agreement. Applitools' sole liability for any breach of this warranty or any other warranty under this Agreement shall be, at Applitools' sole discretion: (i) to replace or repair the Software or the applicable portion thereof; or (ii) to terminate this Agreement.
19
+ 2. Warranty Exclusions. The warranties set forth in Section ‎4 are contingent upon Licensee's proper use of the Software, and shall not apply to damage caused by abuse, misuse, alteration, neglect or unauthorized repair or installation, or by the use or attempted use of Software other than that supplied and supported by Applitools. Applitools will use reasonable commercial efforts to repair or replace the Software or the applicable portion thereof, pursuant to the foregoing warranty within thirty (30) days of being so notified.
20
+ 1. Warranty Disclaimers. AS BETWEEN LICENSEE AND APPLITOOLS, EXCEPT AS SET IN SECTION ‎4, THE SOFTWARE IS PROVIDED ON AN "AS IS" AND "AS AVAILABLE" BASIS WITHOUT WARRANTIES OF ANY KIND INCLUDING, WITHOUT LIMITATION, REPRESENTATIONS, WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR INTENDED OR PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT, THAT THE SOFTWARE WILL MEET LICENSEE'S REQUIREMENTS OR EXPECTATIONS OR WILL ACHIEVE ANY SPECIFIC RESULTS AND THOSE ARISING BY STATUTE OR FROM A COURSE OF DEALING OR USAGE OF TRADE. Applicable law may not allow the exclusion of certain warranties, so to that extent such exclusions may not apply.
21
+ 1. High Risk Activities. You acknowledge that the Software is not fault tolerant and is not designed, manufactured, or intended for use or resale as on-line control equipment in hazardous or high risk environments and activities requiring fail-safe performance (such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines and/or devices, or weapons systems) in which the failure of the Software could lead directly to death, personal injury, or severe physical or environmental damage, and You agree not to use or allow the use of the Software or any portion thereof for, or in connection with, any such environment or activity.
22
+ 1. Indemnify. You agree that Applitools shall have no liability whatsoever for any use made of the Software by You or any third party. You hereby agree to defend, indemnify and hold harmless Applitools and its affiliates and their respective officers, directors, agents and employees from any and all claims, damages, liabilities, costs, and expenses (including attorney's fees) arising from claims related to Your use of the Software as well as from Your failure to comply with this Agreement.
23
+ 1. Limitation of Liability. UNDER NO CIRCUMSTANCES SHALL APPLITOOLS AND/OR ITS AFFILIATES BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR FOR ANY LOSS OF DATA, REVENUE, BUSINESS OR REPUTATION, THAT ARISES UNDER OR IN CONNECTION WITH THIS AGREEMENT, OR THAT RESULTS FROM THE USE OF, OR THE INABILITY TO USE, THE SOFTWARE. APPLITOOLS'S TOTAL AGGREGATE LIABILITY FOR ANY AND ALL DIRECT DAMAGES AND LOSSES THAT ARISE UNDER OR IN CONNECTION WITH THIS AGREEMENT SHALL NOT IN ANY CIRCUMSTANCE EXCEED THE AMOUNT OF 100.00 (ONE HUNDRED) UNITED STATES DOLLARS. THE FOREGOING LIMITATIONS AND EXCLUSIONS IN THIS SECTION ‎7 SHALL APPLY: (I) EVEN IF APPLITOOLS HAS BEEN ADVISED OF THE POSSIBILITY OF ANY DAMAGES OR LOSSES; (II) EVEN IF ANY REMEDY SET FORTH HEREIN FAILS OF ITS ESSENTIAL PURPOSE; AND (III) REGARDLESS OF THE BASIS OR THEORY OF LIABILITY.
24
+ 1. Export Laws. Licensee agrees to comply fully with all U.S., EU, Israeli, and all applicable export laws and regulations to ensure that neither the Software nor any technical data related thereto are exported or re-exported directly or indirectly in violation of, or used for any purposes prohibited by, such laws and regulations. For clarity, and without derogating from Section ‎11 below, in case of any change of any applicable law, policy or regulation, which might affect Applitools' business, Applitools will have the right to terminate this Agreement and the license granted hereunder and the Licensee shall have no claims regarding such termination.
25
+ 1. Term and Termination. This Agreement shall continue until terminated as set forth in this section (the "Term"). You may terminate this Agreement at any time by removing the Software from Your system and destroying all copies of the Software and Documentation relating to the Software. Unauthorized copying of the Software or otherwise failing to comply with this Agreement will result in automatic immediate termination of this Agreement and will make available to Applitools legal remedies. Applitools reserves the right to terminate this Agreement and the License at any time and without notice. Upon termination of this Agreement, the License will terminate and You: (i) will cease any and all rights to use the Software, and (ii) will remove the Software from all hard drives, networks and other storage media and destroy all copies of the Software in your possession or under your control. The provisions of Sections ‎2.3, ‎2.4, ‎2.5, ‎6, ‎7, ‎8, ‎9, 10, ‎11 and ‎12 shall survive the termination, expiration or other ending of this Agreement.
26
+ 1. Miscellaneous. This Agreement represents the complete agreement concerning the Software between You and Applitools and supersedes all prior agreements and representations between You and Applitools. If any provision of this Agreement is held to be unenforceable for any reason, such provision shall be reformed only to the extent necessary to make it enforceable. Any waiver of any provision of this Agreement will be effective only if in writing and signed by Applitools. This Agreement is personal to You and may not be assigned or transferred for any reason whatsoever without the consent of Applitools and any action or conduct in violation of the foregoing shall be void and without effect. Applitools expressly reserves the right to assign this Agreement and to delegate any of its obligations hereunder. This Agreement are governed by and construed under the laws of the State of Israel, excluding its conflicts of law rules. You expressly agree that the exclusive jurisdiction for any claim or action arising out of or relating to this Agreement shall be the courts located in Tel Aviv, Israel, and You further agree and submit to the exercise of personal jurisdiction of such courts for the purpose of litigating any such claim or action. In any action or proceeding to enforce rights under this Agreement, the prevailing party shall be entitled to recover costs and attorneys' fees.
data/README.md ADDED
@@ -0,0 +1,423 @@
1
+ # Applitools Eyes Capybara SDK
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/eyes_capybara.svg)](https://badge.fury.io/rb/eyes_capybara)
4
+
5
+ The Applitools Eyes Capybara SDK seamlessly integrates visual testing into your Capybara test automation. Add AI-powered visual validations to your existing Capybara tests with minimal code changes.
6
+
7
+ ## Table of Contents
8
+ 1. [Overview](#overview)
9
+ 2. [Installation](#installation)
10
+ 3. [Quick Start](#quick-start)
11
+ 4. [Key Components](#key-components)
12
+ 5. [Advanced Usage](#advanced-usage)
13
+ 6. [Common Patterns](#common-patterns)
14
+ 7. [Best Practices](#best-practices)
15
+ 8. [Common Pitfalls](#common-pitfalls)
16
+ 9. [FAQ](#faq)
17
+
18
+ ## Overview
19
+
20
+ The Applitools Eyes Capybara SDK bridges Capybara's browser automation with Applitools' visual AI technology. This integration enables you to perform visual validations within your Capybara tests, whether you're using RSpec, Cucumber, or any other Ruby testing framework.
21
+
22
+ ### Key Features
23
+
24
+ - **Seamless Integration**: Works with your existing Capybara setup
25
+ - **Framework Agnostic**: Compatible with RSpec, Cucumber, Minitest, and more
26
+ - **Multiple Driver Support**: Works with Selenium-based Capybara drivers
27
+ - **Visual Grid Support**: Test across multiple browsers and viewports in parallel
28
+ - **Flexible API**: Use the same familiar Applitools API with Capybara conveniences
29
+
30
+ The SDK leverages the underlying Eyes Selenium SDK while providing a tailored interface specifically designed for Capybara's driver architecture and testing patterns.
31
+
32
+ ## Installation
33
+
34
+ Add the gem to your Gemfile:
35
+
36
+ ```ruby
37
+ gem 'eyes_capybara'
38
+ ```
39
+
40
+ Or install it directly:
41
+
42
+ ```bash
43
+ gem install eyes_capybara
44
+ ```
45
+
46
+ ## Quick Start
47
+
48
+ Here's a simple example to get started with Eyes Capybara SDK in an RSpec test:
49
+
50
+ ```ruby
51
+ require 'eyes_capybara'
52
+ require 'capybara/rspec'
53
+
54
+ describe 'My First Visual Test' do
55
+ let(:eyes) { Applitools::Selenium::Eyes.new }
56
+
57
+ before do
58
+ # Set your API key
59
+ eyes.api_key = ENV['APPLITOOLS_API_KEY']
60
+
61
+ # Configure Capybara
62
+ Applitools.register_capybara_driver browser: :chrome
63
+
64
+ # Visit the page to test
65
+ visit 'https://example.com'
66
+ end
67
+
68
+ it 'should look correct' do
69
+ # Start the test
70
+ eyes.open(
71
+ app_name: 'My App',
72
+ test_name: 'My First Test',
73
+ viewport_size: { width: 1200, height: 800 }
74
+ )
75
+
76
+ # Perform a visual validation
77
+ eyes.check('Homepage', Applitools::Selenium::Target.window.fully)
78
+
79
+ # End the test
80
+ eyes.close
81
+ end
82
+
83
+ after do
84
+ # Clean up
85
+ eyes.abort_if_not_closed
86
+ end
87
+ end
88
+ ```
89
+
90
+ ## Key Components
91
+
92
+ ### Driver Integration
93
+
94
+ The Eyes Capybara SDK modifies Capybara's driver architecture to enable visual testing:
95
+
96
+ 1. **Custom Capybara Driver**: The `Applitools::Selenium::Capybara::Driver` class extends Capybara's Selenium driver to integrate with Applitools Eyes.
97
+
98
+ 2. **Driver Registration**: The SDK provides a convenient registration method through the `register_capybara_driver` function, which sets up the custom driver.
99
+
100
+ 3. **Session Extensions**: The SDK extends Capybara's Session class to provide additional methods for Eyes integration.
101
+
102
+ ### Core Functionality
103
+
104
+ The SDK offers these primary capabilities:
105
+
106
+ 1. **Seamless Initialization**: Register a custom Capybara driver that works with Applitools Eyes.
107
+
108
+ 2. **Browser Management**: Switch between the Eyes-wrapped browser and the native browser as needed.
109
+
110
+ 3. **Visual Validation**: Capture and validate screenshots of the application under test.
111
+
112
+ 4. **Cross-Browser Testing**: Test your application across multiple browsers and configurations with Visual Grid integration.
113
+
114
+ ## Advanced Usage
115
+
116
+ ### Customizing the Capybara Driver
117
+
118
+ You can customize the Capybara driver with various options:
119
+
120
+ ```ruby
121
+ Applitools.register_capybara_driver(
122
+ browser: :chrome,
123
+ options: {
124
+ args: ['--headless', '--disable-gpu', '--window-size=1200,800']
125
+ }
126
+ )
127
+ ```
128
+
129
+ ### Working with Remote Browsers
130
+
131
+ For remote WebDriver connections:
132
+
133
+ ```ruby
134
+ Applitools.register_capybara_driver(
135
+ browser: :remote,
136
+ url: 'http://selenium-hub:4444/wd/hub',
137
+ capabilities: Selenium::WebDriver::Remote::Capabilities.chrome
138
+ )
139
+ ```
140
+
141
+ ### Switching Between Eyes and Native Browser
142
+
143
+ Sometimes you may need to perform operations with the native browser:
144
+
145
+ ```ruby
146
+ # Use Eyes-enabled browser for visual testing
147
+ eyes.open(app_name: 'My App', test_name: 'My Test')
148
+ eyes.check('Homepage', Applitools::Selenium::Target.window)
149
+
150
+ # Switch to native browser for other operations
151
+ page.use_native_browser
152
+ page.find('.some-element').click
153
+
154
+ # Switch back to Eyes browser
155
+ driver_for_eyes(eyes)
156
+ eyes.check('After Click', Applitools::Selenium::Target.window)
157
+ ```
158
+
159
+ ## Common Patterns
160
+
161
+ ### Integration with RSpec
162
+
163
+ ```ruby
164
+ # spec_helper.rb
165
+ require 'eyes_capybara'
166
+ require 'capybara/rspec'
167
+
168
+ Applitools.register_capybara_driver browser: :chrome
169
+
170
+ RSpec.configure do |config|
171
+ config.before(:each) do |example|
172
+ @eyes = Applitools::Selenium::Eyes.new
173
+ @eyes.api_key = ENV['APPLITOOLS_API_KEY']
174
+ end
175
+
176
+ config.after(:each) do |example|
177
+ @eyes.abort_if_not_closed
178
+ end
179
+ end
180
+
181
+ # In your spec file
182
+ describe 'Visual Tests' do
183
+ it 'validates the homepage' do
184
+ visit '/'
185
+
186
+ @eyes.open(
187
+ app_name: 'My App',
188
+ test_name: 'Homepage Test',
189
+ viewport_size: { width: 1200, height: 800 }
190
+ )
191
+
192
+ @eyes.check('Homepage', Applitools::Selenium::Target.window.fully)
193
+ @eyes.close
194
+ end
195
+ end
196
+ ```
197
+
198
+ ### Integration with Cucumber
199
+
200
+ ```ruby
201
+ # env.rb
202
+ require 'eyes_capybara'
203
+ require 'capybara/cucumber'
204
+
205
+ Applitools.register_capybara_driver browser: :chrome
206
+
207
+ Before do |scenario|
208
+ @eyes = Applitools::Selenium::Eyes.new
209
+ @eyes.api_key = ENV['APPLITOOLS_API_KEY']
210
+ end
211
+
212
+ After do |scenario|
213
+ @eyes.abort_if_not_closed
214
+ end
215
+
216
+ # In your step definitions
217
+ Given('I am on the homepage') do
218
+ visit '/'
219
+ end
220
+
221
+ When('I start visual testing') do
222
+ @eyes.open(
223
+ app_name: 'My App',
224
+ test_name: @scenario_name,
225
+ viewport_size: { width: 1200, height: 800 }
226
+ )
227
+ end
228
+
229
+ Then('the page should look correct') do
230
+ @eyes.check('Homepage', Applitools::Selenium::Target.window.fully)
231
+ @eyes.close
232
+ end
233
+ ```
234
+
235
+ ## Best Practices
236
+
237
+ 1. **API Key Management**: Always use environment variables for your API key.
238
+ ```ruby
239
+ eyes.api_key = ENV['APPLITOOLS_API_KEY']
240
+ ```
241
+
242
+ 2. **Clean Up Resources**: Always use `abort_if_not_closed` in your teardown phase.
243
+ ```ruby
244
+ after do
245
+ eyes.abort_if_not_closed
246
+ end
247
+ ```
248
+
249
+ 3. **Descriptive Test Names**: Use meaningful app and test names for better organization in the Applitools dashboard.
250
+ ```ruby
251
+ eyes.open(
252
+ app_name: 'E-commerce Website',
253
+ test_name: 'Product Page - Desktop Chrome'
254
+ )
255
+ ```
256
+
257
+ 4. **Batch Tests**: Group related tests in a batch.
258
+ ```ruby
259
+ batch = Applitools::BatchInfo.new('Login Flow Tests')
260
+ eyes.batch = batch
261
+ ```
262
+
263
+ 5. **Viewport Size**: Set a consistent viewport size for reliable testing.
264
+ ```ruby
265
+ eyes.open(
266
+ # other parameters...
267
+ viewport_size: { width: 1200, height: 800 }
268
+ )
269
+ ```
270
+
271
+ 6. **Error Handling**: Implement proper error handling to ensure tests fail gracefully.
272
+ ```ruby
273
+ begin
274
+ eyes.check('Page', Applitools::Selenium::Target.window)
275
+ results = eyes.close
276
+ expect(results.passed?).to be true
277
+ rescue => e
278
+ puts "Eyes error: #{e.message}"
279
+ raise e
280
+ ensure
281
+ eyes.abort_if_not_closed
282
+ end
283
+ ```
284
+
285
+ ## Common Pitfalls
286
+
287
+ 1. **Driver Mismatches**: Ensure you're using the right driver for your testing needs.
288
+ ```ruby
289
+ # Correct way to register driver with specific options
290
+ Applitools.register_capybara_driver browser: :chrome, options: { args: ['--headless'] }
291
+ ```
292
+
293
+ 2. **Session Confusion**: Be careful when switching between Eyes and native browsers.
294
+ ```ruby
295
+ # Incorrect - may cause issues if not properly tracked
296
+ page.use_native_browser
297
+ # ... code ...
298
+ # Forgot to switch back to Eyes browser before checking
299
+
300
+ # Correct
301
+ page.use_native_browser
302
+ # ... code ...
303
+ page.driver_for_eyes(eyes)
304
+ ```
305
+
306
+ 3. **Missing Screenshots**: Ensure the page is fully loaded before visual checks.
307
+ ```ruby
308
+ # Add explicit waits when needed
309
+ expect(page).to have_selector('.loading-indicator', visible: false)
310
+ eyes.check('After Loading', Applitools::Selenium::Target.window)
311
+ ```
312
+
313
+ 4. **Overlooking Browser Options**: Don't forget to configure browser options appropriately.
314
+ ```ruby
315
+ Applitools.register_capybara_driver(
316
+ browser: :chrome,
317
+ options: {
318
+ args: ['--disable-gpu', '--no-sandbox', '--disable-dev-shm-usage']
319
+ }
320
+ )
321
+ ```
322
+
323
+ 5. **Ignoring Cleanup**: Failing to properly clean up resources.
324
+ ```ruby
325
+ # Always include in ensure block
326
+ ensure
327
+ eyes.abort_if_not_closed
328
+ ```
329
+
330
+ ## FAQ
331
+
332
+ ### How does Eyes Capybara differ from Eyes Selenium?
333
+
334
+ Eyes Capybara builds on top of Eyes Selenium, providing specific integration with Capybara's driver architecture. If you're using Capybara for your tests, Eyes Capybara provides a more seamless integration with better support for Capybara-specific patterns and conveniences.
335
+
336
+ ### Can I use Eyes Capybara with any Capybara driver?
337
+
338
+ Eyes Capybara is designed to work with Selenium-based Capybara drivers. It requires a JavaScript-capable driver and will not work with drivers like `:rack_test` or headless drivers like `:poltergeist` that don't use Selenium WebDriver.
339
+
340
+ ### How do I handle dynamic content?
341
+
342
+ You can use various strategies:
343
+ ```ruby
344
+ # Ignore specific regions by selector (recommended)
345
+ eyes.check(
346
+ 'Dynamic Content',
347
+ Applitools::Selenium::Target.window.ignore(:css, '.timestamp-area')
348
+ )
349
+
350
+ # Alternatively, using WebDriver element
351
+ eyes.check(
352
+ 'Dynamic Content',
353
+ Applitools::Selenium::Target.window.ignore(
354
+ page.find('.timestamp-area')
355
+ )
356
+ )
357
+
358
+ # Use a more flexible match level
359
+ eyes.match_level = Applitools::MatchLevel::LAYOUT
360
+ ```
361
+
362
+ ### Can I use Eyes Capybara with headless browsers?
363
+
364
+ Yes, configure your driver with headless options:
365
+ ```ruby
366
+ Applitools.register_capybara_driver(
367
+ browser: :chrome,
368
+ options: { args: ['--headless'] }
369
+ )
370
+ ```
371
+
372
+ ### How do I debug failed visual tests?
373
+
374
+ 1. Check the Applitools dashboard for visual differences
375
+ 2. Use `eyes.save_debug_screenshots = true` to save diagnostic screenshots
376
+ 3. Enable verbose logging with:
377
+ ```ruby
378
+ Applitools::EyesLogger.log_handler = Logger.new(STDOUT)
379
+ Applitools::EyesLogger.log_handler.level = Logger::DEBUG
380
+ ```
381
+
382
+ ### How do I test responsive designs?
383
+
384
+ Use viewport configuration and multiple tests:
385
+ ```ruby
386
+ ['small', 'medium', 'large'].each do |size|
387
+ viewport = case size
388
+ when 'small' then { width: 375, height: 667 }
389
+ when 'medium' then { width: 768, height: 1024 }
390
+ when 'large' then { width: 1440, height: 900 }
391
+ end
392
+
393
+ eyes.open(
394
+ app_name: 'Responsive Website',
395
+ test_name: "Homepage - #{size}",
396
+ viewport_size: viewport
397
+ )
398
+
399
+ eyes.check("Homepage - #{size}", Applitools::Selenium::Target.window.fully)
400
+ eyes.close
401
+ end
402
+ ```
403
+
404
+ ### How can I capture a specific region instead of the entire window?
405
+
406
+ Use the Target API to specify regions by selector (recommended):
407
+ ```ruby
408
+ # Capture a specific region by CSS selector
409
+ eyes.check('Hero Section', Applitools::Selenium::Target.region(:css, '.hero-section'))
410
+
411
+ # Or by ID
412
+ eyes.check('Menu', Applitools::Selenium::Target.region(:id, 'main-navigation'))
413
+
414
+ # Alternatively, using WebDriver element
415
+ element = page.find('.hero-section')
416
+ eyes.check('Hero Section', Applitools::Selenium::Target.region(element))
417
+ ```
418
+
419
+ ## License
420
+
421
+ This SDK is distributed under the Applitools SDK License Agreement. See the [LICENSE](LICENSE) file for more details.
422
+
423
+ **Important:** This SDK may be used solely for your personal, non-commercial purposes. For commercial use, please contact your Applitools representative or visit [applitools.com](https://applitools.com) to obtain a commercial license.
@@ -13,11 +13,13 @@ Gem::Specification.new do |spec|
13
13
  spec.description = 'Provides Capybara support for Applitools Selenium SDK'
14
14
  spec.summary = 'Applitools Ruby Capybara SDK'
15
15
  spec.homepage = 'https://www.applitools.com'
16
- spec.license = 'Applitools'
16
+ spec.license = 'Proprietary'
17
17
 
18
18
  spec.files = `git ls-files lib/applitools/capybara`.split($RS) + [
19
19
  'lib/eyes_capybara.rb',
20
20
  'lib/applitools/eyes_capybara/version.rb',
21
+ 'LICENSE',
22
+ 'README.md',
21
23
  'CHANGELOG.md',
22
24
  'eyes_capybara.gemspec',
23
25
  'Rakefile',
@@ -25,6 +27,6 @@ Gem::Specification.new do |spec|
25
27
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
26
28
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
27
29
  spec.require_paths = %w(lib)
28
- spec.add_dependency 'eyes_selenium', "= 6.9.0"
30
+ spec.add_dependency 'eyes_selenium', "= 6.9.2"
29
31
  spec.add_dependency 'capybara'
30
32
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Applitools
4
4
  module EyesCapybara
5
- VERSION = '6.4.2'.freeze
5
+ VERSION = '6.4.4'.freeze
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eyes_capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.4.2
4
+ version: 6.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Applitools Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-17 00:00:00.000000000 Z
11
+ date: 2025-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eyes_selenium
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 6.9.0
19
+ version: 6.9.2
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: 6.9.0
26
+ version: 6.9.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: capybara
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -46,6 +46,8 @@ extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
48
  - CHANGELOG.md
49
+ - LICENSE
50
+ - README.md
49
51
  - Rakefile
50
52
  - eyes_capybara.gemspec
51
53
  - lib/applitools/capybara/capybara_settings.rb
@@ -54,7 +56,7 @@ files:
54
56
  - lib/eyes_capybara.rb
55
57
  homepage: https://www.applitools.com
56
58
  licenses:
57
- - Applitools
59
+ - Proprietary
58
60
  metadata: {}
59
61
  post_install_message:
60
62
  rdoc_options: []