当前位置:网站首页>pyautogui的简单操作(2)-弹窗操作
pyautogui的简单操作(2)-弹窗操作
2022-08-09 13:07:00 【论一个测试的养成】
import pyautogui as pg
b = pg.alert(text='hahh',title='test',button='ok') #显示一个弹窗
print(b)#点击弹窗后返回button名
b1 = pg.confirm(text='testing',title='HAHHH',buttons=['ok','cancel'])#显示一个确认窗口
print(b1)#获取点击的值,如果'x'掉了窗口,则返回none

'''消息弹窗可以输入文字'''
b2 = pg.prompt(text='testing',title='HAHHH',default='')
print(b2)

b3 = pg.prompt(text='testing',title='HAHHH',default='dd')
print(b3)

'''密码框'''
b4 = pg.password(text='testing',title='HAHHH',default='',mask='')#可以输入密码的密码框,密码框明文显示
b5 = pg.password(text='testing',title='HAHHH',default='',mask='*')#可以输入密码的密码框,密码框*显示

边栏推荐
猜你喜欢

kustomize entry example and basic syntax instructions
![[MRCTF2020]套娃-1](/img/cb/ba780a4929acd9d76f77ab269faff6.png)
[MRCTF2020]套娃-1

WSA toolkit installed app store tip doesn't work how to solve?

Ledong Fire Rescue Brigade was invited to carry out fire safety training for cadres

pytest 基础认知

现在40系显卡都快出来了,为何1060型号的显卡还有这么多人用?

RobotFramework 之 条件判断

Unity3d_API_GPS_LocationService

The sword refers to the offer, cuts the rope 2

问题系列-如何修改或更新localhost里的值
随机推荐
NC61 两数之和
kustomize entry example and basic syntax instructions
Process/Thread Related in Sandbox - 2
PO、DO、TO、VO、DO、DTO、DAO、POJO都是什么?
5G China unicom repeater network management protocol real-time requirements
JS本地存储 sessionStorage和localStorage
JS动画函数封装
WPF 实现带蒙版的 MessageBox 消息提示框
FPGA - Summary of bugs in ISE (in update)
剑指 Offer 57 - II. 和为s的连续正数序列(滑动窗口)
关于做2D游戏时,Canvas边界显示在Game窗口的问题
剑指offer,剪绳子2
JS轮播图实现
GIN中GET POST PUT DELETE请求
Sandbox中的进程/线程相关-2
Time series analysis course lab report
FFmpeg multimedia file processing (FFMPEG logging system)
The sword refers to Offer 57 - II. and is a continuous positive sequence of s (sliding window)
GET POST PUT DELETE request in GIN
GIN Bind mode to get parameters and form validation