action.key_down(element,Keys.SHIFT).send_keys("222").key_up(Keys.SHIFT).send_keys("222")
time1 = time.strftime("%Y%m%d%H%M%S")
driver.get_screenshot_as_file("d:\\pic"+time1+".png") # 截屏后保存为图片
driver.get_screenshot_as_png() # 获取当前截屏对应的二进制数据
driver.get_screenshot_as_base64() #获取当前截屏对应的base64编码字符串
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) | Powered by Discuz! X3.2 |