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 .
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?
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
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();