TestCentricity / testcentricity_web

TestCentricityâ„¢ For Web core POM test automation framework gem
https://rubygems.org/gems/testcentricity_web
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Got "NoMethodError" when calling below method. #9

Closed ghost closed 2 years ago

ghost commented 2 years ago

Error : NoMethodError: undefined method each' for nil:NilClass from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/testcentricity_web-4.0.3/lib/testcentricity_web/web_core/page_objects_helper.rb:25:inverify_ui_states'

Code Block :

`def verify_user roles = { Some Roles } ui = { Some UI element validation } ui[change_role_button] = if true stmt 1 else stmt 2 end avatar_ui = if true stmt 1 else stmt 2 end

verify that user information is correctly displayed

verify_ui_states(avatar_ui.merge(ui))

end`

TestCentricity commented 2 years ago

If error is still occurring after upgrading testcentricity_web and Ruby, then please include a more detailed code block for further analysis. Without knowing what you are attempting to pass in to verify_ui_states method, and the context, we cannot determine a reason for the error you are encountering.

ghost commented 2 years ago

it was the issue with some null value in the hash.