擅长:python、mysql、java
<p>您可以使用驱动程序将屏幕截图保存为文件:</p>
<pre><code>self.wd = webdriver.Remote('http://localhost:{0}/wd/hub'.format(self.port), self.desired_caps)
self.wd.get_screenshot_as_file('{0}.jpg'.format(self.desired_caps['deviceName']))
</code></pre>