Skip to content

Instantly share code, notes, and snippets.

View gurrenPizza's full-sized avatar
🗑️
A man's trash is another man's trash

Alberto Figuerêdo gurrenPizza

🗑️
A man's trash is another man's trash
  • 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'