How do i detect a Blinking Icon and Border

Mobile Testing, Android App Testing.
vikram_u_k
Posts: 15
Joined: Tue Mar 15, 2016 12:16 pm

How do i detect a Blinking Icon and Border

Post by vikram_u_k » Tue Mar 15, 2016 1:14 pm

With Android API19, we have a application which displays certain sections of the screen with a Blinking Icon and Borders to display Alerts/Alarms.


As per Sampling theory we need to sample the Blinks at twice the blinkrate to verify that it is Blinking. Is there a Specific method available to check this?.

would a simple for loop to check the icon work?.. may not as the timing between the sample is not exact.
Has anyone seen something like this?.


Would you assertEqual/AttributeEqual this using a Validate Statement?.

jma
Posts: 107
Joined: Fri Jul 03, 2015 9:18 am

Re: How do i detect a Blinking Icon and Border

Post by jma » Thu Mar 17, 2016 12:49 pm

I'm afraid that it will be very difficult to validate a blinking icon or border. Could you upload a Ranorex Snapshot of the corresponding icon? If you are not able to track the blinking border, there won't be a reliable way to perform a validation.

vikram_u_k
Posts: 15
Joined: Tue Mar 15, 2016 12:16 pm

Re: How do i detect a Blinking Icon and Border

Post by vikram_u_k » Mon Mar 21, 2016 2:22 pm

Hi Thank you Jma,
i am unable to share the icon/graphic. It is a Icon that is displayed to indicate matching input values when they are within range (signal is periodic).


The Option to validate the border fails as there is no color attribute for me to check on. I have Rid/Resource but no attribute to check the color of the Border. Should i ask the developer to create a value field which lists the colors as its current value?.

How would i detect the blink.. my observation is that Ranorex still takes some finite time to poll and hence the poll rate should be able to distinguish the blink.

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

Re: How do i detect a Blinking Icon and Border

Post by Support Team » Tue Mar 22, 2016 4:17 pm

Hello vikram_u_k,

In order to validate if the element changes, you will need an attribute.
I've created an example using the border color attribute of a HTML table.
if(Validate.Exists("/dom[@domain='www.yourDomain.com']//table[@bordercolor='rgba(0, 0, 0, 1)']", 3000, "", false))
{
	Report.Info("Boarder is black");
	if(Validate.Exists("/dom[@domain='www.yourDomain.com']//table[@bordercolor='rgba(255, 0, 0, 1)']", 3000, "", false))
	{
		Report.Info("Boarder is red");
		Report.Info("Boarder is blinking");
	}
}
I hope that helps solving the issue.

Regards,
Bernhard

vikram_u_k
Posts: 15
Joined: Tue Mar 15, 2016 12:16 pm

Re: How do i detect a Blinking Icon and Border

Post by vikram_u_k » Mon Mar 28, 2016 7:26 am

Guten Morgen Support/Bernhard,

the Application is a Android APP and the Xpath for the Border does not list any RGBA components in the validation/tracker pane.

Current Object is listed as
/mobileapp[@title='com.test.data.Monitor']/?/?/container[@rid='content'].
The Trsacker lists only
General : enabled, index visible
Android Element: rid
Container: caption, containertype
MobileUIElement: PlatformClass and TemporaryElementID.

How do i validate the @bordercolor attribute?.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How do i detect a Blinking Icon and Border

Post by odklizec » Mon Mar 28, 2016 8:48 am

Hi,

Please post a Ranorex snapshot of the element in question, ideally, both in highlighted and unhighlighted state.

However, if the border color is not stored in the element attributes, there is unfortunately not much you can do about this. My guess is that you will have to use image validation. This may work for validating highligted/unhighlighted state but I'm not sure about 'blinking' validation. Maybe with some sort of loop, in which you could validate image changes?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration