@@ -23,49 +23,35 @@ I will try to accomodate as much as I could as time permit. **There is no need t
23
23
24
24
If you are interested to contribute back to this project, please see **Contributing ** section.
25
25
26
- Example
27
- '''''''
28
-
29
- +----------------+----------------------+---------------------------+-----------------+
30
- | Open Mailbox
| host=imap.domain.com
| [email protected] | password=secret
|
31
- +----------------+----------------------+---------------------------+-----------------+
32
- | ${LATEST} =
| Wait For Email
| [email protected] | timeout=300
|
33
- +----------------+----------------------+---------------------------+-----------------+
34
- | ${HTML} = | Open Link From Email | ${LATEST} |
35
- +----------------+----------------------+---------------------------------------------+
36
- | Should Contain | ${HTML} | Your email address has been updated |
37
- +----------------+----------------------+---------------------------------------------+
38
- | Close Mailbox |
39
- +-------------------------------------------------------------------------------------+
40
-
41
- Multipart Email Example
42
- '''''''''''''''''''''''
43
-
44
- +----------------+----------------------+---------------------------+-----------------+
45
- | Open Mailbox
| host=imap.domain.com
| [email protected] | password=secret
|
46
- +----------------+----------------------+---------------------------+-----------------+
47
- | ${LATEST} =
| Wait For Email
| [email protected] | timeout=300
|
48
- +----------------+----------------------+---------------------------+-----------------+
49
- | ${parts} = | Walk Multipart Email | ${LATEST} |
50
- +----------------+----------------------+---------------------------+-----------------+
51
- | :FOR | ${i} | IN RANGE | ${parts} |
52
- +----------------+----------------------+---------------------------+-----------------+
53
- | \\ | Walk Multipart Email | ${LATEST} |
54
- +----------------+----------------------+---------------------------------------------+
55
- | \\ | ${content-type} = | Get Multipart Content Type |
56
- +----------------+----------------------+---------------------------------------------+
57
- | \\ | Continue For Loop If | '${content-type}' != 'text/html' |
58
- +----------------+----------------------+---------------------------+-----------------+
59
- | \\ | ${payload} = | Get Multipart Payload | decode=True |
60
- +----------------+----------------------+---------------------------+-----------------+
61
- | \\ | Should Contain | ${payload} | your email |
62
- +----------------+----------------------+---------------------------+-----------------+
63
- | \\ | ${HTML} = | Open Link From Email | ${LATEST} |
64
- +----------------+----------------------+---------------------------+-----------------+
65
- | \\ | Should Contain | ${HTML} | Your email |
66
- +----------------+----------------------+---------------------------+-----------------+
67
- | Close Mailbox |
68
- +-------------------------------------------------------------------------------------+
26
+ Examples
27
+ ''''''''
28
+
29
+ .. code :: robotframework
30
+
31
+ *** Settings ***
32
+ Library ImapLibrary
33
+
34
+ *** Test Cases ***
35
+ Email Verification
36
+ Open Mailbox host=imap.domain.com [email protected] password=secret
37
+ ${LATEST} = Wait For Email [email protected] timeout=300
38
+ ${HTML} = Open Link From Email ${LATEST}
39
+ Should Contain ${HTML} Your email address has been updated
40
+ Close Mailbox
41
+
42
+ Multipart Email Verification
43
+ Open Mailbox host=imap.domain.com [email protected] password=secret
44
+ ${LATEST} = Wait For Email [email protected] timeout=300
45
+ ${parts} = Walk Multipart Email ${LATEST}
46
+ :FOR ${i} IN RANGE ${parts}
47
+ \\ Walk Multipart Email ${LATEST}
48
+ \\ ${content-type} = Get Multipart Content Type
49
+ \\ Continue For Loop If '${content-type}' != 'text/html'
50
+ \\ ${payload} = Get Multipart Payload decode=True
51
+ \\ Should Contain ${payload} your email
52
+ \\ ${HTML} = Open Link From Email ${LATEST}
53
+ \\ Should Contain ${HTML} Your email
54
+ Close Mailbox
69
55
70
56
Installation
71
57
------------
@@ -75,15 +61,15 @@ Using ``pip``
75
61
76
62
The recommended installation method is using pip _:
77
63
78
- .. code :: bash
64
+ .. code :: console
79
65
80
66
pip install robotframework-imaplibrary
81
67
82
68
The main benefit of using ``pip `` is that it automatically installs all
83
69
dependencies needed by the library. Other nice features are easy upgrading
84
70
and support for un-installation:
85
71
86
- .. code :: bash
72
+ .. code :: console
87
73
88
74
pip install --upgrade robotframework-imaplibrary
89
75
pip uninstall robotframework-imaplibrary
@@ -92,7 +78,7 @@ Notice that using ``--upgrade`` above updates both the library and all
92
78
its dependencies to the latest version. If you want, you can also install
93
79
a specific version:
94
80
95
- .. code :: bash
81
+ .. code :: console
96
82
97
83
pip install robotframework-imaplibrary==x.x.x
98
84
@@ -128,23 +114,23 @@ and its dependencies yourself.
128
114
129
115
- Find each public key used to sign the package:
130
116
131
- .. code :: bash
117
+ .. code :: console
132
118
133
119
gpg --keyserver pgp.mit.edu --search-keys D1406DE7
134
120
135
121
- Select the number from the list to import the public key
136
122
137
123
- Verify the package against its PGP signature:
138
124
139
- .. code :: bash
125
+ .. code :: console
140
126
141
127
gpg --verify robotframework-imaplibrary-x.x.x.tar.gz.asc robotframework-imaplibrary-x.x.x.tar.gz
142
128
143
129
- Extract each source distribution to a temporary location.
144
130
145
131
- Go to each created directory from the command line and install each project using:
146
132
147
- .. code :: bash
133
+ .. code :: console
148
134
149
135
python setup.py install
150
136
@@ -174,11 +160,10 @@ Usage
174
160
To write tests with Robot Framework and ImapLibrary,
175
161
ImapLibrary must be imported into your Robot test suite.
176
162
177
- +-----------------------+
178
- | *** Settings * ** |
179
- +---------+-------------+
180
- | Library | ImapLibrary |
181
- +---------+-------------+
163
+ .. code :: robotframework
164
+
165
+ *** Settings ***
166
+ Library ImapLibrary
182
167
183
168
See `Robot Framework User Guide `_ for more information.
184
169
@@ -190,7 +175,7 @@ Building Keyword Documentation
190
175
191
176
The `Keyword Documentation `_ can be found online, if you need to generate the keyword documentation, run:
192
177
193
- .. code :: bash
178
+ .. code :: console
194
179
195
180
make doc
196
181
@@ -199,7 +184,7 @@ Run Unit Tests, and Test Coverage Report
199
184
200
185
Test the testing library, talking about dogfooding, let's run:
201
186
202
- .. code :: bash
187
+ .. code :: console
203
188
204
189
make test
205
190
0 commit comments