Skip to content

Commit

Permalink
Adding URL endpoint for switchToParentFrame
Browse files Browse the repository at this point in the history
This allows consumers of the webdriver-server module to implement the
switchToParentFrame command. Note that this does **not** mean that the
command is automatically implemented in drivers that use this module; it
simply means that the driver will correctly understand the URL endpoint.
As an example, the IE driver should now properly return "command not
implemented" rather than "unknown command".
  • Loading branch information
jimevans committed Jun 2, 2014
1 parent f5b3934 commit 88b2ee8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cpp/webdriver-server/command_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ namespace CommandType {
const std::string GetWindowHandles = "getWindowHandles";
const std::string SwitchToWindow = "switchToWindow";
const std::string SwitchToFrame = "switchToFrame";
const std::string SwitchToParentFrame = "switchToParentFrame";
const std::string GetActiveElement = "getActiveElement";
const std::string GetCurrentUrl = "getCurrentUrl";
const std::string GetPageSource = "getPageSource";
Expand Down
1 change: 1 addition & 0 deletions cpp/webdriver-server/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ void Server::PopulateCommandRepository() {
this->AddCommand("/session/:sessionid/execute_async", "POST", webdriver::CommandType::ExecuteAsyncScript);
this->AddCommand("/session/:sessionid/screenshot", "GET", webdriver::CommandType::Screenshot);
this->AddCommand("/session/:sessionid/frame", "POST", webdriver::CommandType::SwitchToFrame);
this->AddCommand("/session/:sessionid/frame/parent", "POST", webdriver::CommandType::SwitchToParentFrame);
this->AddCommand("/session/:sessionid/window", "POST", webdriver::CommandType::SwitchToWindow);
this->AddCommand("/session/:sessionid/window", "DELETE", webdriver::CommandType::Close);
this->AddCommand("/session/:sessionid/cookie", "GET", webdriver::CommandType::GetAllCookies);
Expand Down

0 comments on commit 88b2ee8

Please sign in to comment.