MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / GetClickLocation

Method GetClickLocation

cpp/iedriver/Element.cpp:533–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531}
532
533int 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
563int Element::GetStaticClickLocation(LocationInfo* click_location) {
564 std::vector<LocationInfo> frame_locations;

Callers

nothing calls this directly

Calls 4

IsDisplayedMethod · 0.95
LOGClass · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected