如果你是在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”