| 531 | } |
| 532 | |
| 533 | int Element::GetClickLocation(const ElementScrollBehavior scroll_behavior, |
| 534 | LocationInfo* element_location, |
| 535 | LocationInfo* click_location) { |
| 536 | LOG(TRACE) << "Entering Element::GetClickLocation"; |
| 537 | |
| 538 | bool displayed; |
| 539 | int status_code = this->IsDisplayed(true, &displayed); |
| 540 | if (status_code != WD_SUCCESS) { |
| 541 | LOG(WARN) << "Unable to determine element is displayed"; |
| 542 | return status_code; |
| 543 | } |
| 544 | |
| 545 | if (!displayed) { |
| 546 | LOG(WARN) << "Element is not displayed"; |
| 547 | return EELEMENTNOTDISPLAYED; |
| 548 | } |
| 549 | |
| 550 | std::vector<LocationInfo> frame_locations; |
| 551 | status_code = this->GetLocationOnceScrolledIntoView(scroll_behavior, |
| 552 | element_location, |
| 553 | &frame_locations); |
| 554 | |
| 555 | if (status_code == WD_SUCCESS) { |
| 556 | bool document_contains_frames = frame_locations.size() != 0; |
| 557 | *click_location = CalculateClickPoint(*element_location, |
| 558 | document_contains_frames); |
| 559 | } |
| 560 | return status_code; |
| 561 | } |
| 562 | |
| 563 | int Element::GetStaticClickLocation(LocationInfo* click_location) { |
| 564 | std::vector<LocationInfo> frame_locations; |
nothing calls this directly
no test coverage detected