Drawing 3 points which will create a polygon
WebElement element = driver.findElement(By.xpath("html/body/div[3]/div[2]/div[2]/div[2]/div/canvas"));
Actions builder = new Actions(driver);
Action drawAction = builder.moveToElement(element,135,15) // start point in the canvas
//signatureWebElement is the element that holds the signature element you have in the DOM
.click()
.moveByOffset(200, 60) // second point
.click()
.moveByOffset(100, 70) // third point
.doubleClick()
.build();
drawAction.perform();
WebElement element = driver.findElement(By.xpath("html/body/div[3]/div[2]/div[2]/div[2]/div/canvas"));
Actions builder = new Actions(driver);
Action drawAction = builder.moveToElement(element,135,15) // start point in the canvas
//signatureWebElement is the element that holds the signature element you have in the DOM
.click()
.moveByOffset(200, 60) // second point
.click()
.moveByOffset(100, 70) // third point
.doubleClick()
.build();
drawAction.perform();
Very helpful. Keep it going.
ReplyDelete:) thanks
DeleteAwesome! Thanks!!
ReplyDeletePerfect. Thank you!
ReplyDelete