Validate Screenshots depending on endpoint

Best practices, code snippets for common functionality, examples, and guidelines.
Pamana
Posts: 4
Joined: Thu May 17, 2018 9:13 am

Validate Screenshots depending on endpoint

Post by Pamana » Wed May 23, 2018 5:11 pm

Hello,

I have a question regarding the endpoint configuration.

Is it possible to verify screenshots depending on the endpoint and the active endpoint configuration used?

Many Thanks in advance

asdf
Posts: 174
Joined: Mon Mar 21, 2016 3:16 pm

Re: Validate Screenshots depending on endpoint

Post by asdf » Fri May 25, 2018 2:09 pm

Hi Pamana,

The following code could help you to reach your goal.

Code: Select all

        	string host = Host.CurrentHost;
        	if (host == "Samsung S7") {
        		//Do Image-comparison
        	}
        	if (host == "iPhone") {
        		//Do Image-comparison
        	}
You can combine this with the conditional execution-feature in Ranorex. This helps to keep the maintenance of the TestSuite as small as possible.

I hope that helps.
asdf