Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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"])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #window #coordinates #selenium
ADD COMMENT
Topic
Name
9+7 =