Home
last modified time | relevance | path

Searched refs:widget (Results 1 - 13 of 13) sorted by relevance

/test/testfwk/arkxtest/uitest/server/
H A Delement_node_iterator_impl.cpp44 bool ElementNodeIteratorImpl::DFSNextWithInTarget(Widget &widget) in DFSNextWithInTarget() argument
59 WrapperElement(widget); in DFSNextWithInTarget()
60 widget.SetHierarchy(WidgetHierarchyBuilder::Build(parentHierarchy, 0)); in DFSNextWithInTarget()
61 elementIndexToHierarch_.emplace(currentIndex_, widget.GetHierarchy()); in DFSNextWithInTarget()
65 return VisitNodeByChildAndBrother(widget); in DFSNextWithInTarget()
68 bool ElementNodeIteratorImpl::DFSNext(Widget &widget, uint32_t windowId) in DFSNext() argument
78 WrapperElement(widget); in DFSNext()
79 widget.SetHierarchy(ROOT_HIERARCHY + to_string(windowId)); in DFSNext()
80 elementIndexToHierarch_.emplace(currentIndex_, widget.GetHierarchy()); in DFSNext()
83 return VisitNodeByChildAndBrother(widget); in DFSNext()
138 WrapperElement(Widget &widget) WrapperElement() argument
144 VisitNodeByChildAndBrother(Widget &widget) VisitNodeByChildAndBrother() argument
179 VisitChildren(Widget& widget) VisitChildren() argument
203 VisitBrother(Widget &widget, int parentIndex, int tempChildIndex) VisitBrother() argument
229 WrapperNodeAttrToVec(Widget &widget, const AccessibilityElementInfo &element) WrapperNodeAttrToVec() argument
275 WrapperNodeActionAttrToVec(Widget &widget, const AccessibilityElementInfo &element) WrapperNodeActionAttrToVec() argument
[all...]
H A Delement_node_iterator_impl.h30 bool DFSNextWithInTarget(Widget &widget) override;
31 bool DFSNext(Widget &widget, uint32_t windowId) override;
41 void WrapperElement(Widget &widget) override;
44 bool VisitNodeByChildAndBrother(Widget &widget);
45 bool VisitChildren(Widget& widget);
46 bool VisitBrother(Widget &widget, int parentIndex, int tempCurrentIndex);
47 void WrapperNodeAttrToVec(Widget &widget, const OHOS::Accessibility::AccessibilityElementInfo &element);
48 void WrapperNodeActionAttrToVec(Widget &widget, const OHOS::Accessibility::AccessibilityElementInfo &element);
/test/testfwk/arkxtest/uitest/test/
H A Dui_model_test.cpp40 Widget widget("hierarchy"); in TEST()
42 ASSERT_EQ("none", widget.GetAttr(UiAttr::MAX)); in TEST()
44 widget.SetAttr(UiAttr::MAX, "wyz"); in TEST()
45 ASSERT_EQ("", widget.GetAttr(UiAttr::TEXT)); in TEST()
48 /** NOTE:: Widget need to be movable since we need to move a constructed widget to
49 * its hosting tree. We must ensure that the move-created widget be same as the
54 Widget widget("hierarchy"); in TEST()
55 widget.SetAttr(UiAttr::TEXT, "wyz"); in TEST()
56 widget.SetAttr(UiAttr::ID, "100"); in TEST()
57 widget in TEST()
[all...]
H A Dmock_element_node_iterator.h158 bool DFSNextWithInTarget(Widget &widget) override
167 WrapperElement(widget); variable
171 bool DFSNext(Widget &widget, uint32_t windowId) override
175 WrapperElement(widget); variable
225 void WrapperNodeAttrToVec(Widget &widget, const MockAccessibilityElementInfo &element) in WrapperNodeAttrToVec() argument
228 widget.SetBounds(nodeOriginRect); in WrapperNodeAttrToVec()
231 widget.SetHierarchy(element.hierarchy); in WrapperNodeAttrToVec()
232 widget.SetAttr(UiAttr::ACCESSIBILITY_ID, element.accessibilityId); in WrapperNodeAttrToVec()
233 widget.SetAttr(UiAttr::ID, element.inspectorKey); in WrapperNodeAttrToVec()
234 widget in WrapperNodeAttrToVec()
[all...]
H A Dselect_strategy_test.cpp43 Widget widget{"test"}; in TEST()
45 widget.SetBounds(widOriBounds); in TEST()
46 widget.SetAttr(UiAttr::VISIBLE, "true"); in TEST()
47 widget.SetAttr(UiAttr::TYPE, "Scroll"); in TEST()
48 plain->RefreshWidgetBounds(widget); in TEST()
49 ASSERT_EQ(widget.GetAttr(UiAttr::VISIBLE), "false"); in TEST()
50 auto rect = widget.GetBounds(); in TEST()
70 Widget widget{"test"}; in TEST()
72 widget.SetBounds(widOriBounds); in TEST()
73 plain->RefreshWidgetBounds(widget); in TEST()
[all...]
/test/testfwk/arkxtest/uitest/core/
H A Dselect_strategy.cpp46 void SelectStrategy::CalcWidgetVisibleBounds(Widget &widget) in CalcWidgetVisibleBounds() argument
51 if (!RectAlgorithm::ComputeIntersection(widget.GetBounds(), windowBounds_, visibleRect)) { in CalcWidgetVisibleBounds()
52 LOG_D("Widget %{public}s bounds is %{public}s, without window bounds %{public}s, widget info is %{public}s", in CalcWidgetVisibleBounds()
53 widget.GetAttr(UiAttr::ACCESSIBILITY_ID).data(), widget.GetBounds().Describe().data(), in CalcWidgetVisibleBounds()
54 windowBounds_.Describe().data(), widget.ToStr().data()); in CalcWidgetVisibleBounds()
55 widget.SetBounds(noneZone); in CalcWidgetVisibleBounds()
58 widget.SetBounds(visibleRect); in CalcWidgetVisibleBounds()
61 auto hier = widget.GetAttr(UiAttr::HIERARCHY); in CalcWidgetVisibleBounds()
66 if (!RectAlgorithm::ComputeIntersection(widget in CalcWidgetVisibleBounds()
131 RefreshWidgetBounds(Widget &widget) RefreshWidgetBounds() argument
[all...]
H A Delement_node_iterator.h25 virtual bool DFSNextWithInTarget(Widget &widget) = 0;
26 virtual bool DFSNext(Widget &widget, uint32_t windowId) = 0;
37 virtual void WrapperElement(Widget &widget) = 0;
H A Dui_driver.cpp194 static std::unique_ptr<SelectStrategy> ConstructSelectStrategyByRetrieve(const Widget &widget) in ConstructSelectStrategyByRetrieve() argument
196 WidgetMatchModel attrMatch{UiAttr::HASHCODE, widget.GetAttr(UiAttr::HASHCODE), EQ}; in ConstructSelectStrategyByRetrieve()
202 string UiDriver::GetHostApp(const Widget &widget) in GetHostApp() argument
204 auto winId = widget.GetAttr(UiAttr::HOST_WINDOW_ID); in GetHostApp()
221 const Widget *UiDriver::RetrieveWidget(const Widget &widget, ApiCallErr &err, bool updateUi) in RetrieveWidget() argument
234 std::unique_ptr<SelectStrategy> selectStrategy = ConstructSelectStrategyByRetrieve(widget); in RetrieveWidget()
236 if (widget.GetAttr(UiAttr::HOST_WINDOW_ID) != std::to_string(curWinCache.window_.id_)) { in RetrieveWidget()
254 msg << "Widget: " << widget.GetAttr(UiAttr::DUMMY_ATTRNAME_SELECTION); in RetrieveWidget()
255 msg << "dose not exist on current UI! Check if the UI has changed after you got the widget object"; in RetrieveWidget()
264 if (widget in RetrieveWidget()
[all...]
H A Dselect_strategy.h53 virtual void RefreshWidgetBounds(Widget &widget);
54 virtual void CalcWidgetVisibleBounds(Widget &widget);
H A Dui_driver.h36 * @returns the widget object.
41 /**Wait for the matching widget appear in the given timeout.*/
47 /**Retrieve widget from updated UI.*/
48 const Widget *RetrieveWidget(const Widget &widget, ApiCallErr &err, bool updateUi = true);
53 string GetHostApp(const Widget &widget);
108 // unique widget object save
H A Dwidget_operator.h24 WidgetOperator(UiDriver &driver, const Widget &widget, const UiOpArgs &options);
26 /**Perform generic-click widget.*/
29 /**Inject the given text to the widget.*/
32 /**Scroll widget to the end (top or bottom).*/
35 /**Drag widget to another one.*/
38 /**Pinch widget to the target scale*/
41 /**Scroll on the widget to find the target widget matching the selector.*/
H A Dwidget_operator.cpp83 WidgetOperator::WidgetOperator(UiDriver &driver, const Widget &widget, const UiOpArgs &options) in WidgetOperator() argument
84 : driver_(driver), widget_(widget), options_(options) in WidgetOperator()
233 LOG_W("Scroll search widget failed: %{public}s", selector.Describe().data()); in ScrollFindWidget()
H A Dfrontend_api_handler.cpp709 if (recv.empty()) { // widget-exist assertion failure, deliver exception in RegisterUiDriverComponentFinders()
713 } else if (in.apiId_ == "Driver.findComponents") { // return widget array, maybe empty in RegisterUiDriverComponentFinders()
1241 auto &widget = GetBackendObject<Widget>(in.callerObjRef_); in RegisterUiComponentOperators1()
1244 auto wOp = WidgetOperator(driver, widget, uiOpArgs); in RegisterUiComponentOperators1()
1289 auto &widget = GetBackendObject<Widget>(in.callerObjRef_); in RegisterUiComponentOperators2()
1292 auto wOp = WidgetOperator(driver, widget, uiOpArgs); in RegisterUiComponentOperators2()

Completed in 8 milliseconds