Issue 21: 手机模拟滑动屏幕, 使用driver.get_window_size()会报错,提示selenium.common.exceptions.WebDriverException: Message: The URL ‘/wd/hub/session/2763af95-8c0c-4533-8b73-0eae25e5a026/window/size’ did not map to a valid resource
Solution:
源码路径:python-path\Lib\site-packages\selenium\webdriver\remote\remote_connection.py (353行)
修改selenium源码变更get_window_size的请求路径为:
Command.W3C_GET_WINDOW_SIZE: (‘GET’, ‘/session/ s e s s i o n