Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python robot框架:带有预览缩略图的嵌入式屏幕截图_Python_Html_Base64_Robotframework - Fatal编程技术网

Python robot框架:带有预览缩略图的嵌入式屏幕截图

Python robot框架:带有预览缩略图的嵌入式屏幕截图,python,html,base64,robotframework,Python,Html,Base64,Robotframework,因此,如果测试失败,我希望嵌入屏幕截图: b_64 = driver.get_screenshot_as_base64() logger.info(f'<img width="500" src="data:image/png;base64, {b_64}" alt="Red dot"/>', html=True) b_64=driver.get_screenshot_as_base64() logger.info(f'',

因此,如果测试失败,我希望嵌入
屏幕截图

b_64 = driver.get_screenshot_as_base64()
logger.info(f'<img width="500" src="data:image/png;base64, {b_64}" alt="Red dot"/>', html=True)
b_64=driver.get_screenshot_as_base64()
logger.info(f'',html=True)
我不想把
屏幕截图
放在全尺寸上,因此在我的示例中,我使用的是自定义
尺寸
(500)
因此,我的问题是,是否可以添加小预览
屏幕截图
,一旦用户单击它,它就会变成全尺寸?

最有可能的方法是在img标签中的onclick事件显示全尺寸图像,或者只使用纯css悬停-如果yAny更改代码示例,您可能会得到更好的答案?