You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sameer49 edited this page Nov 8, 2014
·
1 revision
Feature
Feature: Gmail Login
As a user I should able to login into Gmail.
Scenario: I login with valid credentialGiven I navigate to "http://www.gmail.com"And I enter "abc@gmail.com" into input field having id "Email"And I enter "123456" into input field having id "Passwd"When I click on element having id "signIn"And I wait for 15 sec
Then I should logged in
Step Definitions
require'selenium-cucumber'# Do Not Remove This File# Add your custom steps hereThen(/^I should logged in$/)do# Your Ruby Codeenddefmethod_nameparam1param2 ...
# Your Ruby Codeend
Reusing Steps
Given(/^I open "(.*?)"$/)do |arg1|
step%[I navigate to "#{arg1}"]endAnd(/^I enter username "(.*?)"$/)do |arg1|
step%[I enter "#{arg1}" into input field having id "Email"]endAnd(/^I enter password "(.*?)"$/)do |arg1|
step%[I enter "#{arg1}" into input field having id "Passwd"]endWhen(/^I click signin button$/)dostep%[I click on element with id "signIn"]endThen(/^this is my another custom step$/)do# write your own ruby code here.end