在獲取坐標(biāo)(x,y)后,使用selenium ActionChains點(diǎn)擊時(shí)報(bào)錯(cuò)盗扒。
1. 報(bào)錯(cuò) selenium.common.exceptions.MoveTargetOutOfBoundsException: Message: move target out of bounds
因?yàn)镸acBook Retina屏幕是用2x2個(gè)像素點(diǎn)去表示原來(lái)的1x1像素跪楞,長(zhǎng)寬都需要除以2
?2. 坐標(biāo)錯(cuò)誤,使用selenium?ActionChains 點(diǎn)擊需要使用 selenium save_screen 截圖侣灶,只截瀏覽器網(wǎng)頁(yè)部分甸祭,?ImageGrab.grab().save(source_path) 是當(dāng)前頁(yè)面的截圖。