Signature issue under Mobile Automation

HI i am facing one issue , need to automate Signature pad . we have a one option where we need to do signature for approval . But there is no locators for that field’s , so please help me out how can i pass signature in signature pad to move further step .

please follow screen shot and locators.

please do need full help

Try with his parent (whose ID I can not see on the screenshot) like this:

driver.findElement(By.id("parentsID")).findElement(By.className("android.view.View"));

sure
i will try and get back to you

hi can you please suggest me how to create signature on signature pad under appium.

I’m not sure how and if that is possible. Also I would need to know how does the pad work. You can put your signature just by writing on a screen by touch?

In that case you should use Touch actions:

http://appium.io/docs/en/writing-running-appium/touch-actions/

Also check if this article is in any help:

Thank you , i will check let you know

Hi Rohit were u able to perform Signature if yes can u please share ur logic…

Thanks
VS

Hi , currently i am not using signature i spoke with my developer they made it Un-mandatory

Np @rohit1 I did manage to draw a line …

is it please can you suggest me how you did …

First get the centre SignPad.getCenter() and store in variable Point class
get int.x,int.y,
for newx, newy add some intx+5 and inty+5
Perform touch that is move from x,y to newx,y

Try once…

Hi VSharma Ji,

I am also facing same issue in java. So, kindly share the code for signature on pad.
Please, help me out of this issue.

Thanks you so much ji.

This drew a line …on the sign pad
Here signpad is the webelement

Point SP = SignPad.getCenter();
int x = SP.x;
int y = SP.y;
int newx = (SP.x + 5) / 2;
int newy = (SP.y + 5) / 2;
TouchAction builder = new TouchAction(driver);
builder.press(PointOption.point(x, y)).moveTo(PointOption.point(newx, newy)).perform().release();

@VS

1 Like

Thank you ji.
And which device have used for automation??

This worked for me. Thank you very much.