如果你是在Linux 环境下,可以用现成的expect软件来实现,基本不需要什么复杂的编程,QA都应该可以做

来源: gpu 2024-02-27 18:38:34 [] [博客] [旧帖] [给我悄悄话] 本文已被阅读: 次 (1715 bytes)
本文内容已被 [ gpu ] 在 2024-02-27 20:29:57 编辑过。如有问题,请报告版主或论坛管理删除.

正所谓,会的不难,难的不会。

了解如何使用expect, 可以阅读O'Reilly的书: <<Exploring Expect>>

https://www.oreilly.com/library/view/exploring-expect/9781565920903/

For example, under Ubuntu:

#sudo apt update

#sudo apt install expect

#man expect

EXPECT(1)                   General Commands Manual                  EXPECT(1)

NAME
       expect - programmed dialogue with interactive programs, Version 5

SYNOPSIS
       expect [ -dDinN ] [ -c cmds ] [ [ -[f|b] ] cmdfile ] [ args ]

INTRODUCTION
       Expect  is a program that "talks" to other interactive programs accord‐
       ing to a script.  Following the script, Expect knows what  can  be  ex‐
       pected  from a program and what the correct response should be.  An in‐
       terpreted language provides branching and high-level control structures
       to direct the dialogue.  In addition, the user can take control and in‐
       teract directly  when  desired,  afterward  returning  control  to  the
       script.

       。。。。。

 

请您先登陆,再发跟帖!

发现Adblock插件

如要继续浏览
请支持本站 请务必在本站关闭/移除任何Adblock

关闭Adblock后 请点击

请参考如何关闭Adblock/Adblock plus

安装Adblock plus用户请点击浏览器图标
选择“Disable on www.wenxuecity.com”

安装Adblock用户请点击图标
选择“don't run on pages on this domain”