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
3 // found in the LICENSE file.
5 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_STATUS_H_
6 #define CHROME_TEST_CHROMEDRIVER_CHROME_STATUS_H_
10 // WebDriver standard status codes.
17 kStaleElementReference = 10,
18 kElementNotVisible = 11,
19 kInvalidElementState = 12,
21 kJavaScriptError = 17,
22 kXPathLookupError = 19,
25 kInvalidCookieDomain = 24,
26 kUnexpectedAlertOpen = 26,
29 kInvalidSelector = 32,
30 kSessionNotCreatedException = 33,
31 // Chrome-specific status codes.
32 kChromeNotReachable = 100,
33 kNoSuchExecutionContext,
39 // Represents a WebDriver status, which may be an error or ok.
42 explicit Status(StatusCode code);
43 Status(StatusCode code, const std::string& details);
44 Status(StatusCode code, const Status& cause);
45 Status(StatusCode code, const std::string& details, const Status& cause);
48 void AddDetails(const std::string& details);
53 StatusCode code() const;
55 const std::string& message() const;
62 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_STATUS_H_