我尝试为 GUI 应用程序编写测试 throw Winium + Selenium 但主要一点,我无法完成开始抛出测试的过程。
*** Settings ***
Library Process
Suite Setup suite_setup
Suite Teardown suite_teardown
*** TestCases ***
testcase1
Click Element id=btnHome
Click Element id=tbLPN
Input Text id=tbLPN testtext
Click Element id=btnManualRequest
Click Element id=btnHome
*** Keywords ***
suite_setup
Start process C:\\test\\Winium.Desktop.Driver.exe shell=yes alias=first
Start process C:\\test\\Services.exe shell=yes alias=second
${procID1} = Get Process Id first #here I just checked that alias is working
${procID1} = Get Process Id second #here I just checked that alias is working
Import Library Selenium2Library
${winium_host}= Set Variable localhost
${winium_port}= Set Variable 9999
${capabilities}= Create Dictionary app=C:\\test\\Gui.exe
Create Webdriver Remote command_executor=http://${winium_host}:${winium_port} desired_capabilities=${capabilities}
sleep 8
suite_teardown
Terminate Process first True
我认为这个问题是winium,因为我用简单的calc.exe尝试这种方式,它运行良好。
如何杀死 GUI 应用程序?因为抛出终止进程它不工作(
阿尔乔姆