Skip to content

Instantly share code, notes, and snippets.

View gurrenPizza's full-sized avatar
🚀
I mess around with React Native, and soon with Ruby on Rails!!

Alberto Figuerêdo gurrenPizza

🚀
I mess around with React Native, and soon with Ruby on Rails!!
  • Brazil
View GitHub Profile
@gurrenPizza
gurrenPizza / auto_fill_form.rb
Created October 6, 2024 16:41
Presenting the capybara syntax for Claudio Pacheco's medium article about automating form filling with selenium and ruby
require 'capybara/rspec'
require 'creek'
require 'selenium/webdriver'
Capybara.default_driver = :selenium # defaults to firefox, but you can have :selenium_chrome and :selenium_chrome_headless
# as well as other options
describe 'automating a form', type: :feature do
it 'submits a form - happier path' do
visit 'https://formy-project.herokuapp.com/form'