So I have this in my code " location = self.driver.find_element_by_name(“Spell To Execute”).location" and when I print it out I get “{‘x’: 1175, ‘y’: 302}”. My question is how to break out the X and Y coordinates into different variables so I can use them for a click drag.
Below mentioned is a Java code for drag and drop using coordinates, hope it can help you.
int startX = 200;
int startY = 250;
int endX = 200;
int endY = 400;
Point start = new Point(startX, startY);
Point end = new Point(endX, endY);
touchAction.press(PointOption.point(startX, startY))
.perform()
.moveTo(PointOption.point(endX, endY))
.release().perform();