Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5432)

Unified Diff: chrome/test/webdriver/commands/webelement_commands.h

Issue 6482014: Implement sendKeys webdriver API in ChromeDriver. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/webdriver/commands/webelement_commands.h
===================================================================
--- chrome/test/webdriver/commands/webelement_commands.h (revision 73909)
+++ chrome/test/webdriver/commands/webelement_commands.h (working copy)
@@ -2,16 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_TEST_WEBDRIVER_COMMANDS_WEBELEMENT_COMMAND_H_
-#define CHROME_TEST_WEBDRIVER_COMMANDS_WEBELEMENT_COMMAND_H_
+#ifndef CHROME_TEST_WEBDRIVER_COMMANDS_WEBELEMENT_COMMANDS_H_
+#define CHROME_TEST_WEBDRIVER_COMMANDS_WEBELEMENT_COMMANDS_H_
#include <string>
#include <vector>
#include "chrome/test/webdriver/commands/webdriver_command.h"
+class DictionaryValue;
+
namespace webdriver {
+class Response;
+
// Handles commands that interact with a web element in the WebDriver REST
// service.
class WebElementCommand : public WebDriverCommand {
@@ -37,6 +41,41 @@
DISALLOW_COPY_AND_ASSIGN(WebElementCommand);
};
+// Sends keys to the specified web element. Also gets the value property of an
+// element.
+// http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/value
+class ElementValueCommand : public WebElementCommand {
+ public:
+ ElementValueCommand(const std::vector<std::string>& path_segments,
+ DictionaryValue* parameters)
+ : WebElementCommand(path_segments, parameters) {}
+ virtual ~ElementValueCommand() {}
+
+ virtual bool DoesGet() { return true; }
+ virtual bool DoesPost() { return true; }
+ virtual void ExecuteGet(Response* const response);
+ virtual void ExecutePost(Response* const response);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ElementValueCommand);
+};
+
+// Gets the visible text of the specified web element.
+// http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/text
+class ElementTextCommand : public WebElementCommand {
+ public:
+ ElementTextCommand(const std::vector<std::string>& path_segments,
+ DictionaryValue* parameters)
+ : WebElementCommand(path_segments, parameters) {}
+ virtual ~ElementTextCommand() {}
+
+ virtual bool DoesGet() { return true; }
+ virtual void ExecuteGet(Response* const response);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ElementTextCommand);
+};
+
} // namespace webdriver
-#endif // CHROME_TEST_WEBDRIVER_COMMANDS_WEBELEMENT_COMMAND_H_
+#endif // CHROME_TEST_WEBDRIVER_COMMANDS_WEBELEMENT_COMMANDS_H_
« no previous file with comments | « chrome/test/webdriver/commands/webelement_command.cc ('k') | chrome/test/webdriver/commands/webelement_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698