Answers for "get window coordinates selenium"

0

get window coordinates selenium

#Get the current location of your browser 
browser_location = driver.get_window_position()
# eg: {'y': 127, 'x': 15}

# Set the absolute position of your Web element here (top-left corner)
element_location = (element.location["x"]+ browser_location["x"],
                    element.location["y"]+ browser_location["y"])
Posted by: Guest on May-20-2021

Python Answers by Framework

Browse Popular Code Answers by Language