Notifications
Clear all
Topic starter
30/11/2022 11:42 am
How can we test multiple resolutions in a same application without writing multiple scripts?
30/11/2022 11:57 am
The same concept applies for browsers as for mobile devices. Handle multiple viewports for mobile for visual testing – Imagium Technical Discussion – Imagium Forum
Before proceeding to a solution, lets understand how Imagium works. In Imagium any snapshot inside a project is uniquely identified with Test Name and Step Name. Playing around with them gives you flexibility to deal with other similar scenario.
You have two options:
- Create Test Name at runtime
- Or create Step Name at runtime
If you want to distinguish between the resolution, you can simple change the set the TestName/StepName at runtime like :
Login640X480, Login1920X1080 (Imagium will automatically create two versions of the baseline)
int width = 1920; int height = 1080; driver.manage().window().setSize(new Dimension(width, height)); String uid = getUID("Test Color"+width+"X"+height, "b84eb8f0-3056-4f3c-9a4e-5e8cfd3e33f7");