Skip to content
Open

Noob #40

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Feature: Gmail_login
When I click on element having id "signIn"
And I wait for 10 sec
Then I close browser
And user succesfully login in bukalapak
6 changes: 6 additions & 0 deletions lib/selenium-cucumber/assertion_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
check_alert_text(actual_value)
end

Then(/^I link having text "(.*?)" should\s*((?:not)?)\s+be present$/) do |access_name, present|
check_element_presence('link', access_name, present.empty?)
end

# step to assert dropdown list
Then(/^option "(.*?)" by (.+) from dropdown having (.+) "(.*?)" should be (selected|unselected)$/) do |option, by, type, access_name, state|
validate_locator type
Expand All @@ -87,3 +91,5 @@
Then(/^actual image having (.+) "(.*?)" and expected image having (.+) "(.*?)" should be similar$/) do |actual_img_access_type, actual_img_access_name, excp_img_access_type, excp_img_access_name|
does_images_similar?(actual_img_access_type, actual_img_access_name, excp_img_access_type, excp_img_access_name)
end


7 changes: 4 additions & 3 deletions lib/selenium-cucumber/click_elements_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
click(type, access_name)
end




When(/^I ta eeg on element having (.+) "(.*?)"$/) do |type, access_name|
validate_locator type
click(type, access_name)
end