Selenium:无法使用Python获取元素的正确坐标

时间:2018-07-15 08:21:27

标签: python selenium web

url = 'https://golestan.kntu.ac.ir/home/balancer/balancer.aspx?vv=2&cost=main'
driver = webdriver.Chrome(executable_path = "G://captcha recognition project//chromedriver.exe")
driver.get(url)
driver.set_window_size(1920, 1080)
element = driver.find_element_by_xpath('//*[@id="tblCap"]/tbody/tr[1]/td[3]/img')
location = element.location
size = element.size

正确返回大小,但坐标不正确 例如正确的坐标是1100和600 但输出是900和500 任何解决方案?????

0 个答案:

没有答案