| 127 | if (!text.empty()) |
| 128 | text += ' '; |
| 129 | text += fieldText; |
| 130 | } |
| 131 | } |
| 132 | return text; |
| 133 | } |
| 134 | |
| 135 | void UITestEngine::SetSemanticControlText(IControl* ctrl, const char* text) |
| 136 | { |
| 137 | if (!ctrl) |
| 138 | return; |
| 139 | if (!text || !*text) |
| 140 | { |
| 141 | ClearSemanticControlText(ctrl); |
| 142 | return; |
| 143 | } |
| 144 | ctrl->SetSemanticTestText(RString(text)); |
| 145 | } |
| 146 | |
| 147 | void UITestEngine::ClearSemanticControlText(IControl* ctrl) |
| 148 | { |
| 149 | if (ctrl) |
| 150 | ctrl->ClearSemanticTestText(); |
| 151 | } |
| 152 | |
| 153 | // ── Dump Mode ── |
| 154 | |
| 155 | void UITestEngine::DumpControls(ControlsContainer* container, int depth) |
| 156 | { |
| 157 | if (!container) |
| 158 | return; |
| 159 | |
| 160 | std::string indent(depth * 2, ' '); |
| 161 | LOG_INFO(Core, "{}[UI-DUMP] IDD={} objects={} alwaysShow={}", indent, container->IDD(), |
| 162 | container->GetObjects().Size(), container->AlwaysShow() ? 1 : 0); |
| 163 | |
| 164 | // Dump 3D objects |
| 165 | auto& objects = container->GetObjects(); |
| 166 | LOG_INFO(Core, "{} [objects_count={}]", indent, objects.Size()); |
| 167 | for (int i = 0; i < objects.Size(); i++) |
| 168 | { |
| 169 | ControlObject* obj = objects[i]; |
| 170 | if (!obj) |
| 171 | { |
| 172 | LOG_INFO(Core, "{} OBJ[{}] null", indent, i); |
| 173 | continue; |
| 174 | } |
| 175 | auto* a = dynamic_cast<ControlObjectContainerAnim*>(obj); |
| 176 | auto* z = dynamic_cast<ControlObjectWithZoom*>(obj); |
| 177 | LOG_INFO(Core, "{} OBJ[{}] IDC={} visible={} isContainerAnim={} isWithZoom={}{}{}", indent, i, obj->IDC(), |
| 178 | obj->IsVisible() ? 1 : 0, a ? 1 : 0, z ? 1 : 0, |
| 179 | a ? std::string(" anim=") + std::to_string(a->IsAnimating()) + |
| 180 | " phase=" + std::to_string(a->GetPhase()) |
| 181 | : "", |
| 182 | z ? std::string(" zooming=") + std::to_string(z->IsZooming()) : ""); |
| 183 | } |
nothing calls this directly
no test coverage detected