OLD | NEW |
---|---|
1 This file contains high-level info about how to use password manager tests and | 1 This file contains high-level info about how to use password manager tests and |
2 how to create new ones. | 2 how to create new ones. |
3 | 3 |
4 The password manager tests purpose is to allow automatic password manager | 4 The password manager tests purpose is to allow automatic password manager |
5 checking and avoiding to do so manually. | 5 checking and avoiding to do so manually. |
6 The tests are written in python using selenium Webdriver library. | 6 The tests are written in python using selenium Webdriver library. |
7 | 7 |
8 | 8 |
9 =====Getting started===== | 9 =====Getting started===== |
10 | 10 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
102 * Click: find an element using CSS Selector and click on it. Throw an | 102 * Click: find an element using CSS Selector and click on it. Throw an |
103 exception if the element is not visible. | 103 exception if the element is not visible. |
104 self.Click("css_selector") | 104 self.Click("css_selector") |
105 * ClickIfClickable: find an element using CSS Selector and click on it if it's | 105 * ClickIfClickable: find an element using CSS Selector and click on it if it's |
106 possible to do that. | 106 possible to do that. |
107 self.ClickIfClickable("css_selector") | 107 self.ClickIfClickable("css_selector") |
108 * GoTo: navigate the main frame to a url. | 108 * GoTo: navigate the main frame to a url. |
109 self.GoTo("url") | 109 self.GoTo("url") |
110 * HoverOver: find an element using CSS Selector and hover over it. | 110 * HoverOver: find an element using CSS Selector and hover over it. |
111 self.HoverOver("css_selector") | 111 self.HoverOver("css_selector") |
112 * SendEnterTo: find an element using CSS Selector and send enter to it. | |
engedy
2015/03/26 16:18:55
Could you please make note the removal of this in
vabr (Chromium)
2015/03/26 18:01:49
Done.
| |
113 self.SendEnterTo("css_selector") | |
114 | 112 |
115 * IsDisplayed: check if an element is displayed. | 113 * IsDisplayed: check if an element is displayed. |
116 self.IsDisplayed("css_selector") | 114 self.IsDisplayed("css_selector") |
117 * Wait: wait for some amount of time in seconds. | 115 * Wait: wait for some amount of time in seconds. |
118 self.Wait(10) | 116 self.Wait(10) |
119 * WaitUntilDisplayed: wait for an element defined using CSS Selector to be | 117 * WaitUntilDisplayed: wait for an element defined using CSS Selector to be |
120 displayed. | 118 displayed. |
121 self.WaitUntilDisplayed("css_selector") | 119 self.WaitUntilDisplayed("css_selector") |
122 | 120 |
123 * FillPasswordInto: find an input element using CSS Selector and fill it with | 121 * FillPasswordInto: find an input element using CSS Selector and fill it with |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
170 * Remove the profile if the tests fail at the beginning for unknown reason. | 168 * Remove the profile if the tests fail at the beginning for unknown reason. |
171 * If tests fail, isolate the one that causes problem, read debugging messages | 169 * If tests fail, isolate the one that causes problem, read debugging messages |
172 and keep your eyes on the browser window to understand its causes: | 170 and keep your eyes on the browser window to understand its causes: |
173 a) In the tests, we often need to wait for a menu to appear ... If the | 171 a) In the tests, we often need to wait for a menu to appear ... If the |
174 menu takes more time to appear than expected, the tests are going to fail. | 172 menu takes more time to appear than expected, the tests are going to fail. |
175 b) The websites change very often. And even if they are not changed, they some | 173 b) The websites change very often. And even if they are not changed, they some |
176 time show a popup that broke the tests. In the case you need to login manually | 174 time show a popup that broke the tests. In the case you need to login manually |
177 to the website, close all popup and logout. | 175 to the website, close all popup and logout. |
178 * If you are logged in when the tests crashes, don't forget to log out before | 176 * If you are logged in when the tests crashes, don't forget to log out before |
179 running the tests a second time. | 177 running the tests a second time. |
OLD | NEW |