Accessing screenshots by index or names
Posted: Fri Feb 15, 2019 9:29 am
Hi,
We have to validate different screenshots according to 4 Windows versions.
Thus, 4 screenshots were added to the element, with names Sc_Win7, Sc_Win8, Sc_Win8_1, Sc_Win10.
In a code module, it is possible to access the screenshots with their dedicated methods :
sc_7 = repo.element.GetSc_Win7();
sc_8 = repo.element.GetSc_Win8();
sc_8_1 = repo.element.GetSc_Win8_1();
sc_10 = repo.element.GetSc_Win10();
In a complementary way, would it possible to access the screenshots by their index ?
sc_7 = repo.element.GetScreenshot(0);
sc_8 = repo.element.GetScreenshot(1);
sc_8_1 = repo.element.GetScreenshot(2);
sc_10 = repo.element.GetScreenshot(3);
Or also, by their names ?
sc_7 = repo.element.GetScreenshot("Sc_Win7");
sc_8 = repo.element.GetScreenshot("Sc_Win8");
sc_8_1 = repo.element.GetScreenshot("Sc_Win8_1");
sc_10 = repo.element.GetScreenshot("Sc_Win10");
Thanks
We have to validate different screenshots according to 4 Windows versions.
Thus, 4 screenshots were added to the element, with names Sc_Win7, Sc_Win8, Sc_Win8_1, Sc_Win10.
In a code module, it is possible to access the screenshots with their dedicated methods :
sc_7 = repo.element.GetSc_Win7();
sc_8 = repo.element.GetSc_Win8();
sc_8_1 = repo.element.GetSc_Win8_1();
sc_10 = repo.element.GetSc_Win10();
In a complementary way, would it possible to access the screenshots by their index ?
sc_7 = repo.element.GetScreenshot(0);
sc_8 = repo.element.GetScreenshot(1);
sc_8_1 = repo.element.GetScreenshot(2);
sc_10 = repo.element.GetScreenshot(3);
Or also, by their names ?
sc_7 = repo.element.GetScreenshot("Sc_Win7");
sc_8 = repo.element.GetScreenshot("Sc_Win8");
sc_8_1 = repo.element.GetScreenshot("Sc_Win8_1");
sc_10 = repo.element.GetScreenshot("Sc_Win10");
Thanks