-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrobot_run.robot
72 lines (56 loc) · 1.77 KB
/
robot_run.robot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
*** Settings ***
Library Selenium2Library
Library robot_library.py
Test Teardown Run Keyword If Test Failed Capture Page Screenshot
*** Test Cases ***
Yahoo Transit Test
run_positive_test_case_yahoo_transit
Login Error Test
run_negative_test_case_login_error
Test Panda
test_py_panda
Sample Result Fail
test raise fail
#*** Settings ***
# For python 3, use robot instead of pybot (my python version is 3.7.2)
# https://stackoverflow.com/questions/48134803/calling-a-method-which-is-inside-a-class-in-python-from-a-robot-file
#Library MyLibrary
#
#*** Test Cases ***
#My Test
# Do Nothing
# Hello world
#
#
#
#Keyword names
#Keyword names used in the test data are compared with method names to find the method implementing these keywords. Name comparison is case-insensitive, and also spaces and underscores are ignored. For example, the method hello maps to the keyword name :name:`Hello`, :name:`hello` or even :name:`h e l l o`. Similarly both the do_nothing and doNothing methods can be used as the :name:`Do Nothing` keyword in the test data.
#
#Example Python library implemented as a module in the :file:`MyLibrary.py` file:
#
#def hello(name):
# print("Hello, %s!" % name)
#
#def do_nothing():
# pass
#
#*** Settings ***
#Documentation Example using the space separated plain text format.
#Library OperatingSystem
#
#*** Variables ***
#${MESSAGE} Hello, world!
#
#*** Test Cases ***
#My Test
# [Documentation] Example test
# Log ${MESSAGE}
# My Keyword /tmp
#
#Another Test
# Should Be Equal ${MESSAGE} Hello, world!
#
#*** Keywords ***
#My Keyword
# [Arguments] ${path}
# Directory Should Exist ${path}