page-objects
page-objects copied to clipboard
Please support SPAs and JavaScript heavy applications by allowing PageElements and MultiPageElements to be marked as dynamic
I have an abstraction I've used a lot with Java, where my page objects wait for the visibility of elements that I know to be dynamic. I've even made that the default. Eventually, I need to support similar capabilities in Python. Can a PageElement be asynchronous?
Having looked at the code, I can see that one way to do this would be to add an element to my PageObject that is specially marked as the indicator that the page is ready. Then calling, "page.wait()" would wait for that element. For now, I'll go with that idiom, and build a subclass of PageObject, AsyncPageObject, with a default implementation of wait which looks for a an element called "pageready", and waits for it if it is present, taking an optional timeout.
hi, Any update for pageready? Kind regards, Frank Vu
I'm not a committer on page-objects, but I'll hit you within Gist of a way to do this today.
Here is a Gist indicating how to do this - sorry it took so long - https://gist.github.com/danizen/d6f557456d458a13afb6c879583fe0b2