Comments (1)
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 FindAttribute
s 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.
from atata.
Related Issues (20)
- Change log level of "Starting" and "Finished" test log messages from `Info` to `Debug`
- Change default log date/time format by cutting ten thousandths of a second
- Extract Artifacts Root path out of Artifacts path
- Move `TimeZone` instance property of `AtataContext` to `AtataContext.GlobalProperties`
- Move `BuildStart` and `BuildStartUtc` static properties of `AtataContext` to `AtataContext.GlobalProperties`
- Move `ModeOfCurrent` static property of `AtataContext` to `AtataContext.GlobalProperties`
- Add `ArtifactsPath` property to `AtataContext`
- Replace file path configuration of `NLogFileConsumer` with single `WithFileNameTemplate` method
- Update sanitization approach of `TestInfo` properties `NameSanitized` and `SuiteNameSanitized`
- Apply `[FindByAlt]` attribute to `Image<TOwner>` control
- `TableHeaderList<TItem, TOwner>` with string indexer
- Remove navigation trace log entries
- Use Selenium.WebDriver package v4.19.0
- Use Atata.WebDriverExtras package v3.0.0
- Async ILogManager.ExecuteSection() HOT 4
- Consider re-adding parameterized logging methods HOT 3
- Add `ExecuteSectionAsync` methods to `ILogManager`
- Add `SetupAsync` and `StepAsync` methods to `Report<TOwner>`
- Upgrade Selenium.WebDriver package reference to v4.20.0
- "DevTools version is not in the supported range." under Ubuntu exception when taking snapshot HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atata.