OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_TEST_CHROMEDRIVER_STATUS_H_ | 5 #ifndef CHROME_TEST_CHROMEDRIVER_STATUS_H_ |
6 #define CHROME_TEST_CHROMEDRIVER_STATUS_H_ | 6 #define CHROME_TEST_CHROMEDRIVER_STATUS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 // WebDriver standard status codes. | 10 // WebDriver standard status codes. |
11 enum StatusCode { | 11 enum StatusCode { |
12 kOk = 0, | 12 kOk = 0, |
13 kNoSuchElement = 7, | 13 kNoSuchElement = 7, |
14 kUnknownCommand = 9, | 14 kUnknownCommand = 9, |
15 kStaleElementReference = 10, | 15 kStaleElementReference = 10, |
16 kElementNotVisible = 11, | 16 kElementNotVisible = 11, |
17 kInvalidElementState = 12, | 17 kInvalidElementState = 12, |
18 kUnknownError = 13, | 18 kUnknownError = 13, |
19 kJavaScriptError = 17, | |
19 kXPathLookupError = 19, | 20 kXPathLookupError = 19, |
20 kNoSuchWindow = 23, | 21 kNoSuchWindow = 23, |
21 kInvalidCookieDomain = 24, | 22 kInvalidCookieDomain = 24, |
22 kUnexpectedAlertOpen = 26, | 23 kUnexpectedAlertOpen = 26, |
23 kNoAlertOpen = 27, | 24 kNoAlertOpen = 27, |
25 kScriptTimeout = 28, | |
chrisgao (Use stgao instead)
2013/03/08 21:06:25
According to line 330 in https://code.google.com/p
| |
24 kInvalidSelector = 32, | 26 kInvalidSelector = 32, |
25 kSessionNotCreatedException = 33, | 27 kSessionNotCreatedException = 33, |
26 // Chrome-specific status codes. | 28 // Chrome-specific status codes. |
27 kNoSuchSession = 100, | 29 kNoSuchSession = 100, |
28 kNoSuchFrame, | 30 kNoSuchFrame, |
29 kChromeNotReachable, | 31 kChromeNotReachable, |
30 kDisconnected, | 32 kDisconnected, |
31 }; | 33 }; |
32 | 34 |
33 // Represents a WebDriver status, which may be an error or ok. | 35 // Represents a WebDriver status, which may be an error or ok. |
(...skipping 13 matching lines...) Expand all Loading... | |
47 StatusCode code() const; | 49 StatusCode code() const; |
48 | 50 |
49 const std::string& message() const; | 51 const std::string& message() const; |
50 | 52 |
51 private: | 53 private: |
52 StatusCode code_; | 54 StatusCode code_; |
53 std::string msg_; | 55 std::string msg_; |
54 }; | 56 }; |
55 | 57 |
56 #endif // CHROME_TEST_CHROMEDRIVER_STATUS_H_ | 58 #endif // CHROME_TEST_CHROMEDRIVER_STATUS_H_ |
OLD | NEW |