OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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. |
| 4 |
| 5 #ifndef CHROME_TEST_WEBDRIVER_COMMANDS_IMPLICIT_WAIT_COMMAND_H_ |
| 6 #define CHROME_TEST_WEBDRIVER_COMMANDS_IMPLICIT_WAIT_COMMAND_H_ |
| 7 |
| 8 #include <string> |
| 9 #include <vector> |
| 10 |
| 11 #include "chrome/test/webdriver/commands/webdriver_command.h" |
| 12 |
| 13 namespace webdriver { |
| 14 |
| 15 // Set the amount of time the driver should wait when searching for elements. |
| 16 // If this command is never sent, the driver will default to an implicit wait |
| 17 // of 0 ms. Until the webelement commands are checked in we do no use this |
| 18 // variable. For more information see: |
| 19 // http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/t
imeouts/implicit_wait |
| 20 class ImplicitWaitCommand : public WebDriverCommand { |
| 21 public: |
| 22 inline ImplicitWaitCommand(const std::vector<std::string>& path_segments, |
| 23 const DictionaryValue* const parameters) |
| 24 : WebDriverCommand(path_segments, parameters), ms_to_wait_(0) {} |
| 25 virtual ~ImplicitWaitCommand() {} |
| 26 |
| 27 virtual bool Init(Response* const response); |
| 28 |
| 29 virtual bool DoesPost() { return true; } |
| 30 virtual void ExecutePost(Response* const response); |
| 31 |
| 32 private: |
| 33 int ms_to_wait_; |
| 34 virtual bool RequiresValidTab() { return true; } |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(ImplicitWaitCommand); |
| 37 }; |
| 38 |
| 39 } // namespace webdriver |
| 40 |
| 41 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_IMPLICIT_WAIT_COMMAND_H_ |
| 42 |
OLD | NEW |