标签: python-3.x selenium selenium-webdriver
driver = webdriver.Chrome() driver.get(https://www.google.com) img = driver.find_element_by_xpath("//xpath") location = img.location size = img.size driver.set_window_position(location) driver.set_window_size(size)