I am working on a web scraping problem. I selected elements from HTML using css-selectors and I was wondering if it is possible to include them inside a class in Ruby:
name = browser.p(css: 'p[bo-bind="row.zName"]').text
account = browser.span(css: 'span[bo-bind="row.zAccount"]').text
Is there a way to declare name and account fields inside a class Accounts
?
Something like this:
class Accounts @@name @@account
and then assign to those elements from HTML.