You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be good if can add possibility to work with different pages for different page layout like resolution/device/platform without changing code of test or implementing additional logic related to page layout type.
Or provide example if this possibility already exist.
Thanks,
The text was updated successfully, but these errors were encountered:
The main problem I see here is that Atata's generic page objects model cannot support that. You should pass explicit type of page object to Go.To<TPageObject>(...) method. If a test uses one of the page object types, the type cannot be replaced with another one on a fly. And the base type also would not work here, as base page object type should be generic.
For cases when you need to test multiple resolutions/devices/platforms I would try to configure single page object using multiple JSON config files that contain AtataContext attributes separate for each platform. Kind of you can have single AccountDetailsPage with control properties marked with common attributes (that suit all resolutions), Atata.json (default one with main settings), Atata.Tablet.json, Atata.Mobile.json, etc. The additional configs can add attributes for page object and its controls specific for the resolution. For example you can define different FindAttributes for different resolutions.
{"attributes": {"component": [{"type": "AccountDetailsPage","attributes": [{"type": "attribute type","{{attributeValueName}}": "value"// Any property or constructor parameter of attribute.}],"properties": [{"name": "property name","attributes": [{"type": "attribute type","{{attributeValueName}}": "value"// Any property or constructor parameter of attribute.}]},{//...}]}]}}
I believe that it will not cover all scenarios, but most. For cases when application with different resolutions have completely different UI and behavior, configuring with attributes may not be enough. For such cases, separate resolution tests (with separate page objects as well) can be implemented, for desktop, mobile, tablet. And such tests can be enabled/disabled depending on target platform testing.
If you can, please provide a couple of issues that you have with different resolutions and I can try to help resolve that using the approach described above.
It would be good if can add possibility to work with different pages for different page layout like resolution/device/platform without changing code of test or implementing additional logic related to page layout type.
Or provide example if this possibility already exist.
Thanks,
The text was updated successfully, but these errors were encountered: