当前位置:网站首页>Ride: get picture Base64
Ride: get picture Base64
2022-06-30 22:41:00 【CY ah】
python Script :
import base64
filepath=r'D:\ Photo gallery \0\7102528551.jpg'
f=open(filepath, 'rb')
print(f)
ls_f = base64.b64encode(f.read()).decode("utf8") # Read file contents , Convert to base64 code
print(ls_f)
f.close()
according to python Script steps , stay RIDE Write use case steps in :
base64.b64encode(open('${filepath}','rb').read()).decode('utf8')
stay External Resources Newly added keyword, It is convenient to call... In test cases
*** Settings ***
Library Selenium2Library
Library Collections
*** Keywords ***
Picture conversion base64
[Arguments] ${filepath}
${pic_base64} Evaluate base64.b64encode(open('${filepath}','rb').read()).decode('utf8') base64
#log ${pic_base64}
Evaluate open('${filepath}','rb').close()
[Return] ${pic_base64}
边栏推荐
- What is flush software? In addition, is it safe to open an account online now?
- Kubevela 1.4: make application delivery safer, easier to use, and more transparent
- d编译时计数
- The Sandbox 正在 Polygon 网络上进行部署
- 在线客服系统代码_h5客服_对接公众号_支持APP_支持多语言
- AtCoder Beginner Contest 257
- Technical principle of decentralized exchange system development - digital currency decentralized exchange system development (illustrative case)
- Swift 5.0 - creation and use of swift framework
- 【Android,Kotlin,TFLite】移动设备集成深度学习轻模型TFlite(物体检测篇)
- 图纸加密如何保障我们的核心图纸安全
猜你喜欢
如何使用 DataAnt 监控 Apache APISIX
与AI结对编程式是什么体验 Copilot vs AlphaCode, Codex, GPT-3
How to design test cases
2022中国国潮发展新动向
公有云市场迈入深水区,冷静的亚马逊云还坐得住吗?
latex左侧大括号 latex中大括号多行公式
在线客服聊天系统源码_美观强大golang内核开发_二进制运行傻瓜式安装_附搭建教程...
零样本和少样本学习
Where can I find the computer version of wechat files
Why does the computer speed slow down after vscode is used for a long time?
随机推荐
ESP8266 成为客户端和服务器
Golang application ━ installation, configuration and use of Hugo blog system
Win11如何优化服务?Win11优化服务的方法
Nansen double disk encryption giant self rescue: how to prevent the collapse of billions of dominoes
10 airbags are equipped as standard, and Chery arizer 8 has no dead corner for safety protection
Two way data binding in wechat applet
项目管理到底管的是什么?
十个最为戳心测试/开程序员笑话,念茫茫人海,该如何寻觅?
[golang] golang implements the string interception function substr
机器学习编译入门课程学习笔记第二讲 张量程序抽象
在线客服系统代码_h5客服_对接公众号_支持APP_支持多语言
leetcode:104. 二叉树的最大深度
Tencent has been conducting advanced automated functional testing for 3 years. It is a gift to you who are confused in manual testing
Smart streetlights | cloud computing lights up the "spark" of smart cities
In depth analysis of Apache bookkeeper series: Part 4 - back pressure
B_ QuRT_ User_ Guide(34)
Redis的事务和锁机制
Web APIs comprehensive case -tab column switching - dark horse programmer
As the public cloud market enters the deep water, can the calm Amazon cloud still sit still?
How to use filters in jfinal to monitor Druid for SQL execution?