Robotframework:终止进程
Robotframework: kill the process
我尝试为 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应用程序?因为抛出终止进程它不起作用(
阿尔乔姆
关闭 GUI 的最佳方法是导航到 'Close' 按钮
我尝试为 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应用程序?因为抛出终止进程它不起作用(
阿尔乔姆
关闭 GUI 的最佳方法是导航到 'Close' 按钮