当前位置:网站首页>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} 
边栏推荐
- 智慧路灯| 云计算点亮智慧城市的“星星之火”
- Redis的事务和锁机制
- leetcode:104. 二叉树的最大深度
- B_ QuRT_ User_ Guide(32)
- Flip the linked list ii[three ways to flip the linked list +dummyhead/ head insertion / tail insertion]
- Using Obsidian with Hugo, markdown's local editing software is seamlessly connected with online
- HDFS centralized cache management
- A new one from Ali 25K came to the Department, which showed me what the ceiling is
- Discuz forum speed up to delete XXX under data/log PHP file
- 【Android,Kotlin,TFLite】移动设备集成深度学习轻模型TFlite(物体检测篇)
猜你喜欢

Mysql:sql overview and database system introduction | dark horse programmer
![[fundamentals of wireless communication-13]: illustrated mobile communication technology and application development-1-overview](/img/1d/62e55f1b5445d7349ec383879f4275.png)
[fundamentals of wireless communication-13]: illustrated mobile communication technology and application development-1-overview

Online customer service system code_ H5 customer service_ Docking with official account_ Support app_ Support for multiple languages

Why does the computer speed slow down after vscode is used for a long time?

In depth analysis of Apache bookkeeper series: Part 4 - back pressure

Fastjson V2 简单使用手册

Introduction to machine learning compilation course learning notes lesson 2 tensor program abstraction

MIT doctoral dissertation optimization theory and machine learning practice

latex字母头顶两个点

Swift5.0 ----Swift FrameWork的创建及使用
随机推荐
Introduction to machine learning compilation course learning notes lesson 2 tensor program abstraction
d编译时计数
MIT博士论文 | 优化理论与机器学习实践
How does win11 optimize services? Win11 method of optimizing service
Meet the StreamNative | 杨子棵:是什么让我放弃了大厂 Offer
B_ QuRT_ User_ Guide(32)
HDFS集中式缓存管理(Centralized Cache Management)
Online customer service system code_ H5 customer service_ Docking with official account_ Support app_ Support for multiple languages
Wechat applet transmits parameters (data-) by clicking events
手机上怎么开股票账户?另外,手机开户安全么?
RIDE:获取图片base64
Discuz forum speed up to delete XXX under data/log PHP file
How to upload binary pictures in uniapp
Introduction to digital transformation solutions for enterprises going to sea
How to ensure the security of our core drawings by drawing encryption
What does the software test report contain? How to obtain high quality software test reports?
KubeVela 1.4:让应用交付更安全、上手更简单、过程更透明
“飞桨+辨影相机”成为AI界的“预制菜”,工业AI质检落地更简单
[fundamentals of wireless communication-13]: illustrated mobile communication technology and application development-1-overview
项目管理到底管的是什么?