Commit 72cb6c92 authored by Tatiana Buldina's avatar Tatiana Buldina Committed by Commit Bot

[ChromeDriver] Raise kElementClickIntercepted if element is overlaid

Bug: chromedriver:2773
Change-Id: I663a3a4f280f31e5428c2056d7bdfc64b0c6a048
Reviewed-on: https://chromium-review.googlesource.com/c/1482110Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: Tatiana Buldina <buldina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634697}
parent 4ca897d2
......@@ -74,6 +74,8 @@ const char* DefaultMessageForStatusCode(StatusCode code) {
return "unable to set cookie";
case kTargetDetached:
return "target frame detached";
case kElementClickIntercepted:
return "element click intercepted";
default:
return "<unknown>";
}
......
......@@ -33,6 +33,7 @@ enum StatusCode {
kElementNotInteractable = 60,
kInvalidArgument = 61,
kNoSuchCookie = 62,
kElementClickIntercepted = 64,
kUnsupportedOperation = 405,
// Chrome-specific status codes.
kChromeNotReachable = 100,
......
......@@ -120,8 +120,8 @@ Status VerifyElementClickable(
if (!is_clickable) {
std::string message;
if (!dict->GetString("message", &message))
message = "element is not clickable";
return Status(kUnknownError, message);
message = "element click intercepted";
return Status(kElementClickIntercepted, message);
}
return Status(kOk);
}
......
......@@ -994,6 +994,9 @@ HttpHandler::PrepareStandardResponse(
response.reset(new net::HttpServerResponseInfo(net::HTTP_OK));
break;
// error codes
case kElementClickIntercepted:
response.reset(new net::HttpServerResponseInfo(net::HTTP_BAD_REQUEST));
break;
case kElementNotInteractable:
response.reset(new net::HttpServerResponseInfo(net::HTTP_BAD_REQUEST));
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment