capybara-webkit | Capybara driver for headless WebKit

 by   thoughtbot Ruby Version: Current License: MIT

kandi X-RAY | capybara-webkit Summary

kandi X-RAY | capybara-webkit Summary

capybara-webkit is a Ruby library. capybara-webkit has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

Development has been suspended on this project because QtWebKit was deprecated in favor of QtWebEngine, which is not a suitable replacement for our purposes. We instead recommend using the [Selenium] or [Apparition] drivers. [Selenium]: [Apparition]:
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              capybara-webkit has a medium active ecosystem.
              It has 1994 star(s) with 449 fork(s). There are 85 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 24 open issues and 705 have been closed. On average issues are closed in 104 days. There are 6 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of capybara-webkit is current.

            kandi-Quality Quality

              capybara-webkit has 0 bugs and 59 code smells.

            kandi-Security Security

              capybara-webkit has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              capybara-webkit code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              capybara-webkit is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              capybara-webkit releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.
              capybara-webkit saves you 2731 person hours of effort in developing the same functionality from scratch.
              It has 5917 lines of code, 283 functions and 34 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed capybara-webkit and discovered the below as its top functions. This is intended to give you an instant insight into capybara-webkit implemented functionality, and help decide if they suit your requirements.
            • Converts a named key to a named class .
            • Applies the options .
            • Send a command to the client
            • Accepts a modal or modal it to accept a browser or modal it .
            • Retrieve the attribute value for the given attribute .
            • Handles a modal dialog .
            • Decode the result of an element
            • Switch to the current frame .
            • Return the text of the given block .
            • Internal method to check if client is available
            Get all kandi verified functions for this library.

            capybara-webkit Key Features

            No Key Features are available at this moment for capybara-webkit.

            capybara-webkit Examples and Code Snippets

            No Code Snippets are available at this moment for capybara-webkit.

            Community Discussions

            QUESTION

            Ruby on Rails 4.1.8 Gem::LoadError for mysql2 gem
            Asked 2020-Jun-22 at 18:38

            I picked up a 4 year old project written in Ruby 2.1.3 and Rails 4.1.8.

            Very few of the gems were versioned but I've managed to get the project running locally by installing mysql2 0.3.20 as suggested in multiple other threads. Doing this required me to (on MacOS) downgrade openssl and mysql with brew install mysql@57 and brew install openssl@10.

            I could then install mysql2 with by passing the correct libraries to it: gem install mysql2 -v 0.3.20 -- --with-mysql-config=/usr/local/opt/mysql@5.7/bin/mysql_config --with-ldflags=-L/usr/local/opt/openssl@1.0/lib --with-cppflags=-I/usr/local/opt/openssl@1.0/include

            Everything works locally, all good.

            I'm trying to deploy this project with Dokku on a Debian instance. Here's the readout from the push to dokku master including the error thrown when starting the Rails server:

            ...

            ANSWER

            Answered 2020-Jun-22 at 18:38

            I think I see what's going on. In your Dockerfile, change your DB_URL from: mysql:// to mysql2://

            You are loading the mysql2 gem, but indicating to ActiveRecord that you want to use a connection via the mysql gem.

            Source https://stackoverflow.com/questions/62519721

            QUESTION

            Bundler Error - Cannot Find rake-13.0.1 even though it is installed
            Asked 2020-Mar-11 at 13:19

            I have a Rails import job that run as a cron job setup through the whenever gem. It was running correctly until I recently updated the app. Now we are seeing the following Error in the logs when the cron job tries to run. If I run the task manually it runs the import correctly.

            ...

            ANSWER

            Answered 2020-Mar-09 at 16:21

            Change

            command 'cd /home/sotldirectory && bin/rails r import/cron_import.rb'

            to

            command 'cd /home/sotldirectory && bundle exec rails r import/cron_import.rb'

            Also, which rake version is listed in your Gemfile.lock?

            Source https://stackoverflow.com/questions/60572233

            QUESTION

            ruby selenium execute_script Net::ReadTimeout
            Asked 2019-Aug-16 at 16:21

            I'm using Capybara::Selenium from my script (not tests) for getting some image from external site. Page loads fine, all images are loaded also and I see them, but any attempt to execute function page.session.driver.evaluate_script always throws Net::ReadTimeout: Net::ReadTimeout with #.

            Full code:

            ...

            ANSWER

            Answered 2019-Aug-16 at 16:21

            Small thing first - there is no need to load capybara-webkit if you're using the Selenium driver.

            Now onto the main issue. There is no need to call methods directly on driver when executing JS, rather you should just be calling the Capybara methods execute_script, evaluate_script, or evaluate_async_script. The evaluate_xxx methods are for when you expect a return value, the execute_script method is for when you don't care about any return value. evaluate_async_script receives a callback function as the last argument which needs to be called to return a value, but your JS_GET_IMAGE doesn't appear to ever do that (nor really need to since it's not async) so it would be better to just use evaluate_script. The other requirement for evaluate_script is that the code evaluated needs to be a single statement. To meet that requirement we can use an IIFE.

            Source https://stackoverflow.com/questions/57526110

            QUESTION

            Error: qt@5.5: unknown version :mountain_lion
            Asked 2019-Mar-31 at 02:13

            Followed this tutorial in installing qt5.5 on a macOS version 10.13.6 High Sierra. Failed when trying to brew install qt@5.5 giving me an error below:

            ...

            ANSWER

            Answered 2019-Mar-31 at 02:13

            Referring to the tutorial, the following steps are executed to install qt@5.5

            Source https://stackoverflow.com/questions/54499893

            QUESTION

            Mac OS 10.14 Mojave + qt5.5 + gem capybara-webkit
            Asked 2019-Mar-11 at 15:32

            My config is MAC Mojave v10.14.

            I try to install gem Capybara-webkit -v '1.15.0' which need qt5.5, but qt5.5 has been dropped of the homebrew and it is not compatible with Xcode v10.

            I try this :

            • Uninstall Xcode v10
            • Install Xcode 9.4.1, found in developer.apple.com/
            • Install qt5.5, I have found it in the archives on qt.io/
            • Run bundle

            But it fail, my error is with the gem capybara-webkit -v '1.15.0':

            ...

            ANSWER

            Answered 2018-Oct-05 at 12:14

            I think my problem was with xcrun. For fix I did :

            • sudo chown root:wheel /Applications/Xcode.app
            • sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
            • cd /Applications/Xcode.app/Contents/Developer/usr/bin/
            • sudo ln -s xcodebuild xcrun

            And it work (y) !

            Source https://stackoverflow.com/questions/52661109

            QUESTION

            Capybara with headless chrome doesn't clear session between test cases which use different subdomains
            Asked 2019-Jan-10 at 08:50

            I switched my rails tests from capybara-webkit to headless chrome. When I run a test which visits not the default Capybara host the first case passes but the second one fails because the user are already logged in when they try to login

            I use chromedriver v2.45, selenium-webdriver (3.141.0) and capybara (2.18.0)

            I have the following setup:

            ...

            ANSWER

            Answered 2019-Jan-10 at 08:50

            Are you storing session information in the browsers window.localStorage and/or window.sessionStorage? If so you can set those to be cleared via options passed to the driver (Note: these settings are the default for the selenium driver in Capybara 3.12+)

            Source https://stackoverflow.com/questions/53390321

            QUESTION

            How to test confirm/alert messages with capybara + headless chrome
            Asked 2018-Nov-27 at 19:08

            Recently I switched my acceptance tests from capybara-webkit to headless chrome. In some cases I need to check alert messages (for example, confirm to discard changes when user leaves the page). With capybara-webkit I did it the following way

            ...

            ANSWER

            Answered 2018-Nov-27 at 18:30

            You need to use the text parameter of Capybaras modal handling methods (accept_confirm/accept_alert/etc) -https://www.rubydoc.info/github/jnicklas/capybara/Capybara/Session#accept_confirm-instance_method - which will check the message before it accepts/dismisses the system modal

            Source https://stackoverflow.com/questions/53497922

            QUESTION

            How to ignore extra whitespaces after switching to headless chrome
            Asked 2018-Nov-20 at 16:49

            Recently I switched my cucumber tests from capybara-webkit to headless chrome. Now many features fail with

            expected to find text "commented by J. Smitch" in "commented by[two spaces there]J. Smith"

            Is there a way to tell Capybara to ignore extra whitespaces? Or I need to add whitespaces in my step definitions to make the failing tests green?

            UPDATE 1

            I have   spaces in my markup which are not normalized like this

            ...

            ANSWER

            Answered 2018-Nov-20 at 16:49

            I'm guessing that at the same time you switched from capybara-webkit to selenium with headless chrome you also switched from Capybara 2.x to 3.x. One of the breaking changes in Capybara 3.x is that it attempts to return whitespace more as the user would actually see it. That means that if you have   characters in your markup they don't get collapsed with surrounding spaces since the browser doesn't do that. You can use the normalize_ws option to get back results more like 2.x

            Source https://stackoverflow.com/questions/53392662

            QUESTION

            Capybara Webkit not detecting CSS updates when DOM changes
            Asked 2018-Oct-04 at 20:51

            I have a floating menu that pops up when a user clicks on a menu button (button is hidden behind the floating menu in the image below).

            The functionality works fine in a live browser (tried it on Firefox, Safari, and Chrome).

            However it doesn't seem to work when testing with Capybara-Webkit - the menu never becomes visible on click

            Here's the basic implementation:

            HTML

            The menu is a

              that sits inside a

              ...

            ANSWER

            Answered 2018-Oct-04 at 20:51

            capybara-webkit is basically equivalent to a 7 year old version of Safari (due to QtWebkit, which it is built on, not having been updated in a long time). As such it doesn't support a lot of modern JS/CSS, which happens to include flex box. Because of this display: flex will be considered invalid and ignored.

            You're going to have a much easier time testing your app if you swap from using capybara-webkit to selenium with headless chrome or firefox for your headless testing.

            Source https://stackoverflow.com/questions/52653686

            QUESTION

            Syntax Error after upgrading to Rails 5.2
            Asked 2018-Jun-21 at 23:39

            My tests are failing like so.

            ...

            ANSWER

            Answered 2018-Jun-21 at 23:39

            You are using Ruby version 2.2.5 and you are also upgrading capybara to version 3.2.1. If you take a look at the line that causes the syntax error, the commit message give you a hint: Require minimum of Ruby 2.3.0

            If you look at the history, capybara version 3.2.0 requires Ruby 2.3.0+.

            You can either upgrade your applications Ruby version to 2.3.0 or greater, or set your capybara version to a prior version.

            Source https://stackoverflow.com/questions/50978674

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install capybara-webkit

            You can download it from GitHub.
            On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/thoughtbot/capybara-webkit.git

          • CLI

            gh repo clone thoughtbot/capybara-webkit

          • sshUrl

            git@github.com:thoughtbot/capybara-webkit.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Reuse Pre-built Kits with capybara-webkit

            Consider Popular Ruby Libraries

            rails

            by rails

            jekyll

            by jekyll

            discourse

            by discourse

            fastlane

            by fastlane

            huginn

            by huginn

            Try Top Libraries by thoughtbot

            guides

            by thoughtbotRuby

            bourbon

            by thoughtbotRuby

            paperclip

            by thoughtbotRuby

            laptop

            by thoughtbotShell

            factory_bot

            by thoughtbotRuby