Breaking out X/Y locations into variables

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.


It really depends on what programming language you are using. Your code looks loosely typed so I’m going to guess Python:

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);, startY))
		.moveTo(PointOption.point(endX, endY))