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