ARTICLE DETAIL

资讯详情

深耕网站建设与运营推广的一线实战洞察。

chrome高版本浏览器不兼容driver.execute_script(“return window.performance.getEntries()“)的解决方法

chrome高版本浏览器不兼容driver.execute_script(“return window.performance.getEntries()“)的解决方法

解决办法
将下面的代码替换成新的即可完美解决

历史

entries = self.driver.execute_script("return window.performance.getEntries()")

更新后

entries = self.driver.execute_script("return window.performance.getEntriesByType('resource')") 
返回列表