Would it be useful to be able to bundle helpers with Element classes?.
E.g.
module GitHub
class SearchField < PageMagic::Element
bundled_helpers do
def search term
end
end
end
class HomePage
include PageMagic
url 'https://github.com'
element SearchField
end
github = GitHub::HomePage.visit(browser: :chrome)
github.search('page_magic') # using bundled helper here.
end
This could be tricky to implement but possibly useful?
Would it be useful to be able to bundle helpers with Element classes?.
E.g.
This could be tricky to implement but possibly useful?