cheezy / page-object

Gem to implement PageObject pattern in watir-webdriver and selenium-webdriver
MIT License
653 stars 220 forks source link

Lazy Loading of POs #484

Open Githraine opened 5 years ago

Githraine commented 5 years ago

We have a large implementation with several scores of PO's. We also load data in the initialization of POs. Because all POs are initialized when the test kicks off, All of these assets are loaded. This is a large time and memory suck. We would love a way to run our tests where the POs dont actually get loaded until the 'on(pageobject)' call is made.

jkotests commented 5 years ago

Have you tried using autoload? I had been avoiding it since it was slated to be deprecated (for the past 7 years). However, Matz recently said they are keeping it (https://bugs.ruby-lang.org/issues/5653#note-46). Might be worth a try.