로봇 프레임 워크-프로세스 라이브러리가 포함 된 동안 "이름이 '프로세스 실행'인 키워드가 없습니다."

림 파이어

Robot Framework가 어떻게 작동하는지 이해하려고합니다. 그래서 두 파일을 사용하여 약간의 테스트를 수행했습니다.

hello.py

print('Hello')

TC_Hello.robot

*** Settings ***
  Library  Process

*** Test Cases ***
Example of running a python script
  ${result}=  Run Process  python  D:\\RobotFrameworkTest\\Hello\\hello.py
  Should be equal as strings  ${result.stdout}  Hello

그러나 No keyword with name 'Run Process' found몇 가지 이유로 오류가 발생 합니다. 그래서 나는 그렇게 확인했고 사람들은 내 경우가 아닌 라이브러리를 포함하는 것을 잊은 것 같습니다.

누구든지 나를 도울 수 있습니까?

-- 편집하다

몇 가지 이유로 성공적으로 실행되는 것으로 보이는 다른 구문으로 로봇 파일을 실행 해 보았습니다.

*** Settings ***
| Library | Process

*** Test Cases ***
| Example of running a python script
| | ${result}= | run process | python | D:\\RobotFrameworkTest\\Hello\\hello.py
| | Should be equal as strings | ${result.stdout} | Hello

하지만 내 고용주는이 구문을 좋아하지 않습니다.

림 파이어

-해결

그래서 설정 섹션 Library Process에서 바로 앞에 탭을 넣는 것을 알았습니다 . 따라서 포함되지 않았고 오류가 발생했습니다.Process

이것은 작동합니다.

*** Settings ***
Library  Process # No tab at the beginning here

*** Test Cases ***
Example of running a python script
  ${result}=  Run Process  python  D:\\RobotFrameworkTest\\Hello\\hello.py
  Should be equal as strings  ${result.stdout}  Hello

나는 멍청한 느낌이 든다. 어쨌든 당신의 도움에 감사드립니다.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

Related 관련 기사

뜨겁다태그

보관