Hi! I have my screen steps defined like that:(matching hash key and accessing hash values)
When /^I (?:am on|see) "([^\"]*)" screen$/ do |screen|
$screens_hash[screen]
end
then I have a objectsrepo.rb file with screens hash like i.e.:
$screens_hash={
"Create PIN" => create_pin_screen(),
"Confirm PIN" => confirm_pin_screen(),
...
}
I am trying to use method names as values.
Then methods are defined in a Screen_helpers.rb file in a module like this:
module Screens_helpers
def confirm_new_pin_screen()
$hash1.values_at(
"Confirm New PIN",
"Delete",
"Cancel",
).each do |x|
wait_for(WAIT_TIMEOUT) { element_exists(x)}
end
end
end
When I execute the step I get "undefined method `create_pin_screen' for main:Object (NoMethodError)"
Is there a way or a better way to do that?
Thanks!