Skip to content

Commit 88b2ee8

Browse files
committed
Adding URL endpoint for switchToParentFrame
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".
1 parent f5b3934 commit 88b2ee8

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Diff for: cpp/webdriver-server/command_types.h

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ namespace CommandType {
4747
const std::string GetWindowHandles = "getWindowHandles";
4848
const std::string SwitchToWindow = "switchToWindow";
4949
const std::string SwitchToFrame = "switchToFrame";
50+
const std::string SwitchToParentFrame = "switchToParentFrame";
5051
const std::string GetActiveElement = "getActiveElement";
5152
const std::string GetCurrentUrl = "getCurrentUrl";
5253
const std::string GetPageSource = "getPageSource";

Diff for: cpp/webdriver-server/server.cc

+1
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,7 @@ void Server::PopulateCommandRepository() {
639639
this->AddCommand("/session/:sessionid/execute_async", "POST", webdriver::CommandType::ExecuteAsyncScript);
640640
this->AddCommand("/session/:sessionid/screenshot", "GET", webdriver::CommandType::Screenshot);
641641
this->AddCommand("/session/:sessionid/frame", "POST", webdriver::CommandType::SwitchToFrame);
642+
this->AddCommand("/session/:sessionid/frame/parent", "POST", webdriver::CommandType::SwitchToParentFrame);
642643
this->AddCommand("/session/:sessionid/window", "POST", webdriver::CommandType::SwitchToWindow);
643644
this->AddCommand("/session/:sessionid/window", "DELETE", webdriver::CommandType::Close);
644645
this->AddCommand("/session/:sessionid/cookie", "GET", webdriver::CommandType::GetAllCookies);

0 commit comments

Comments
 (0)