# frozen_string_literal: true require_relative '../../page_objects/pages/login_page' Given("I'm a registered user on the login page") do @login_page = LoginPage.new(<% if automation == 'watir'%>@browser<% else %>@driver<% end %>) @login_page.visit end When('I login with my credentials') do @login_page.login('aguspe', '12341234') end When('I can see the main page') do expect(@login_page.header.customer_name).to eq 'Welcome back Agustin' end