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

Method GetAllVariantObjectPropertyValues

cpp/iedriver/VariantUtilities.cpp:530–559  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

528}
529
530int VariantUtilities::GetAllVariantObjectPropertyValues(IElementManager* element_manager,
531 VARIANT variant_value,
532 Json::Value* value) {
533 std::vector<std::wstring> property_names;
534 GetPropertyNameList(variant_value.pdispVal, &property_names);
535
536 for (size_t i = 0; i < property_names.size(); ++i) {
537 CComVariant property_value_variant;
538 bool property_value_retrieved =
539 GetVariantObjectPropertyValue(variant_value.pdispVal,
540 property_names[i],
541 &property_value_variant);
542 if (!property_value_retrieved) {
543 LOG(WARN) << "Did not successfully get value for property '"
544 << StringUtilities::ToString(property_names[i])
545 << "' from object.";
546 return EUNEXPECTEDJSERROR;
547 }
548
549 Json::Value property_value;
550 ConvertVariantToJsonValue(element_manager,
551 property_value_variant,
552 &property_value);
553
554 std::string name = StringUtilities::ToString(property_names[i]);
555 (*value)[name] = property_value;
556 }
557
558 return WD_SUCCESS;
559}
560
561} // namespace webdriver

Callers

nothing calls this directly

Calls 2

LOGClass · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected