Accessing screenshots by index or names

Class library usage, coding and language questions.
jla
Posts: 3
Joined: Mon Feb 11, 2019 11:34 am

Accessing screenshots by index or names

Post by jla » 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

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Accessing screenshots by index or names

Post by Support Team » Wed Feb 20, 2019 5:02 pm

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