Page 1 of 1

Accessing screenshots by index or names

Posted: Fri Feb 15, 2019 9:29 am
by jla
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

Re: Accessing screenshots by index or names

Posted: Wed Feb 20, 2019 5:02 pm
by Support Team
Hello jla,

I'm afraid, to get the screenshot of the element in the repository you have to their dedicated methods. There is no other GetScreenshot() method available now.

If this is important for you, I would recommend creating a UserVoice entry on our website.

Regards,
Bernhard