How to fetch Id of custom views(drawings done using canvas) in monkeytalk and automate it?

63 Views Asked by At

How do we test custom views in monkeytalk?(android and ios application automation)I have tried giving content description to some views and fetch id, it works fine, but when it comes to some complex views that involves canvas drawing , I am not able to fetch id!!Please can anyone suggest how to go about it?

Below is the android code snippet that I am using

    Paint myPaint = new Paint();
    myPaint.setAntiAlias(true);
    myPaint.setColor(res.getColor(R.color.dialerFontColorDark));
    myPaint.setStyle(Paint.Style.FILL);
    android.graphics.Path timePointer = new android.graphics.Path();

    // Draws the upper arrow on the top of the temperature box
    timePointer.moveTo(dialCenterX - getDip(6),
            (dialCenterY - this.dialRadius) - getDip(32));
    timePointer.lineTo(dialCenterX, (dialCenterY - this.dialRadius)
            - getDip(20));
    timePointer.lineTo(dialCenterX + getDip(6),
            (dialCenterY - this.dialRadius) - getDip(32));
    timePointer.close();
    *canvas.drawPath(timePointer, myPaint);*
    timePointer.reset();

How do we fetch id for the canvas drawn in monkeytalk?

0

There are 0 best solutions below