This project is archived and will no longer be maintained by its contributor due to a change in management. This project is now replaced by https://github.com/Eth3rnit3/chromate
Playwright Stealth is a Ruby gem that allows you to use Playwright with stealth mode. It patches Playwright to prevent detection.
Install the gem and add it to the application's Gemfile by executing:
bundle add playwright_stealthIf Bundler is not being used to manage dependencies, install the gem by executing:
gem install playwright_stealthTo use Playwright Stealth, require the gem in your Ruby script and initialize it as follows:
require 'playwright_stealth'
PlaywrightStealth.install unless PlaywrightStealth.installed?
PlaywrightStealth.browser(:chromium, headless: true) do |_context, page|
page.goto('https://bot.sannysoft.com')
sleep(1)
page.screenshot(path: 'results/intoli.png')
endbundle exec rake test:intolibundle exec rake test:browserleaksbundle exec rake test:pixelscanbundle exec rake test:brodetectorAfter checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run:
bundle exec rake installTo release a new version, update the version number in version.rb, and then run:
bundle exec rake releaseThis will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/Eth3rnit3/playwright_stealth. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
This gem was built with the help of the following projects:
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the PlaywrightStealth project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the code of conduct.



