43#include <rtl/ustrbuf.hxx>
57 aMap[
"NotImplemented"] =
"NotImplemented";
65 throw std::exception();
70 return "Generic UIObject";
75 return std::unique_ptr<UIObject>();
80 return std::set<OUString>();
128 if (isDialogWindow(pWindow) || isTopWindow(pWindow))
135 return get_top_parent(pParent);
138std::vector<KeyEvent> generate_key_events_from_text(std::u16string_view rStr)
140 std::vector<KeyEvent> aEvents;
142 for (
size_t i = 0, n = rStr.size(); i != n; ++i)
144 aEvents.emplace_back(rStr[i], aCode);
152 if (cChar >=
'a' && cChar <=
'z')
153 return KEY_A + (cChar -
'a');
154 else if (cChar >=
'A' && cChar <=
'Z')
157 return KEY_A + (cChar -
'A');
159 else if (cChar >=
'0' && cChar <=
'9')
160 return KEY_0 + (cChar -
'A');
165bool isFunctionKey(
const OUString& rStr, sal_uInt16& rKeyCode)
167 std::map<OUString, sal_uInt16> aFunctionKeyMap = {
183 auto itr = aFunctionKeyMap.find(rStr);
184 if (itr == aFunctionKeyMap.end())
187 rKeyCode = itr->second;
191std::vector<KeyEvent> generate_key_events_from_keycode(std::u16string_view rStr)
193 std::vector<KeyEvent> aEvents;
195 std::map<OUString, sal_uInt16> aKeyMap = {
218 OUString aRemainingText;
221 for (
auto const& token : aTokens)
223 OUString aToken = token.trim();
224 if (aToken ==
"CTRL")
228 else if (aToken ==
"SHIFT")
232 else if (aToken ==
"ALT")
237 aRemainingText = aToken;
240 sal_uInt16 nFunctionKey = 0;
241 if (isFunctionKey(aRemainingText, nFunctionKey))
243 vcl::KeyCode aCode(nFunctionKey, bShift, bMod1, bMod2,
false);
244 aEvents.emplace_back(0, aCode);
246 else if (aKeyMap.find(aRemainingText) != aKeyMap.end())
248 sal_uInt16 nKey = aKeyMap[aRemainingText];
250 aEvents.emplace_back(
'a', aCode);
254 for (sal_Int32 i = 0;
i < aRemainingText.getLength(); ++
i)
256 bool bShiftThroughKey =
false;
257 sal_uInt16 nKey = get_key(aRemainingText[i], bShiftThroughKey);
258 vcl::KeyCode aCode(nKey, bShift || bShiftThroughKey, bMod1, bMod2,
false);
259 aEvents.emplace_back(aRemainingText[i], aCode);
266OUString to_string(
const Point& rPos)
268 OUString sStr = OUString::number(rPos.
X())
270 + OUString::number(rPos.
Y());
275OUString to_string(
const Size& rSize)
277 OUString sStr = OUString::number(rSize.
Width())
279 + OUString::number(rSize.
Height());
306 aMap[
"RelPosition"] = to_string(aPos);
313 bool bIgnoreAllExceptTop = isDialogWindow(
mxWindow.
get());
317 if (!bIgnoreAllExceptTop)
320 if (isDialogWindow(pParent))
322 bIgnoreAllExceptTop =
true;
327 if (!pParent && bIgnoreAllExceptTop)
330 aMap[
"AbsPosition"] = to_string(aPos);
340 if (rAction ==
"SET")
342 for (
auto const& parameter : rParameters)
344 std::cout << parameter.first;
347 else if (rAction ==
"TYPE")
349 auto it = rParameters.find(
"TEXT");
350 if (it != rParameters.end())
352 const OUString& rText = it->second;
353 auto aKeyEvents = generate_key_events_from_text(rText);
354 for (
auto const& keyEvent : aKeyEvents)
359 else if (rParameters.find(
"KEYCODE") != rParameters.end())
361 auto itr = rParameters.find(
"KEYCODE");
362 const OUString rText = itr->second;
363 auto aKeyEvents = generate_key_events_from_keycode(rText);
364 for (
auto const& keyEvent : aKeyEvents)
372 for (
auto const & rPair : rParameters)
373 buf.append(
"," + rPair.first.toUtf8() +
"=" + rPair.second.toUtf8());
374 SAL_WARN(
"vcl.uitest",
"missing parameter TEXT to action TYPE "
375 << buf.makeStringAndClear());
376 throw std::logic_error(
"missing parameter TEXT to action TYPE");
379 else if (rAction ==
"FOCUS")
386 for (
auto const & rPair : rParameters)
387 buf.append(
"," + rPair.first.toUtf8() +
"=" + rPair.second.toUtf8());
389 <<
". Action: " << rAction << buf.makeStringAndClear());
390 throw std::logic_error(
"unknown action");
401vcl::Window* findChild(
vcl::Window* pParent,
const OUString& rID,
bool bRequireVisible =
false, OUStringBuffer* debug =
nullptr)
406 if (pParent->
get_id() == rID)
413 bool bCandidate = !bRequireVisible || pChild->
IsVisible();
417 if (pChild->
get_id() == rID)
421 debug->append(pChild->
get_id() +
" ");
423 vcl::Window* pResult = findChild(pChild, rID, bRequireVisible, debug);
431void addChildren(
vcl::Window const * pParent, std::set<OUString>& rChildren)
442 OUString aId = pChild->
get_id();
445 auto ret = rChildren.insert(aId);
446 SAL_WARN_IF(!ret.second,
"vcl.uitest",
"duplicate ids '" << aId <<
"' for ui elements. violates locally unique requirement");
449 addChildren(pChild, rChildren);
461 OUStringBuffer debug;
466 pWindow = findChild(pDialogParent, rID,
false, &debug);
470 throw css::uno::RuntimeException(
"Could not find child with id: " + rID +
" children were " + std::u16string_view(debug));
473 return aFunction(pWindow);
485 pWindow = findChild(pDialogParent, rID,
true);
489 throw css::uno::RuntimeException(
"Could not find child with id: " + rID);
492 return aFunction(pWindow);
497 std::set<OUString> aChildren;
501 aChildren.insert(pDialogParent->
get_id());
502 addChildren(pDialogParent, aChildren);
509 return "WindowUIObject";
514OUString escape(
const OUString& rStr)
516 return rStr.replaceAll(
"\"",
"\\\"");
523 OUStringBuffer aStateString =
"{\"name\":\"" +
mxWindow->
get_id() +
"\"";
524 aStateString.append(
", \"ImplementationName\":\"").appendAscii(
typeid(*mxWindow).name()).append(
"\"");
526 for (
auto const& elem : aState)
528 OUString
property =
",\"" + elem.first +
"\":\"" + escape(elem.second) +
"\"";
535 aStateString.append(
",\"children\":[");
541 aStateString.append(
",");
544 std::unique_ptr<UIObject> pChildWrapper =
546 OUString children = pChildWrapper->dumpState();
547 aStateString.append(children);
551 aStateString.append(
"]");
553 aStateString.append(
"}");
555 OUString aString = aStateString.makeStringAndClear();
556 return aString.replaceAll(
"\n",
"\\n");
562 std::unique_ptr<UIObject> pParentWrapper =
564 return pParentWrapper->dumpState();
570 OUString aActionName;
579 aActionName =
"CLICK";
583 aActionName =
"TYPE";
586 aActionName = OUString::number(
static_cast<int>(nEvent));
588 return "Action on element: " +
mxWindow->
get_id() +
" with action : " + aActionName;
618 if (rAction ==
"CLICK")
623 pPushButton->Check(!pPushButton->IsChecked());
624 pPushButton->Toggle();
635 return "ButtonUIObject";
645 return "Start writer" ;
650 return "Start calc" ;
655 return "Start impress" ;
660 return "Start draw" ;
665 return "Start math" ;
670 return "Start database" ;
673 if (get_top_parent(
mxButton)->get_id().isEmpty()){
712 return "DialogUIObject";
735 bool bHandled =
true;
736 if (rAction ==
"TYPE")
738 auto it = rParameters.find(
"TEXT");
739 if (it != rParameters.end())
741 const OUString& rText = it->second;
742 auto aKeyEvents = generate_key_events_from_text(rText);
743 for (
auto const& keyEvent : aKeyEvents)
753 else if (rAction ==
"SET")
755 auto it = rParameters.find(
"TEXT");
756 if (it != rParameters.end())
764 else if (rAction ==
"SELECT")
766 if (rParameters.find(
"FROM") != rParameters.end() &&
767 rParameters.find(
"TO") != rParameters.end())
769 tools::Long nMin = rParameters.find(
"FROM")->second.toInt32();
770 tools::Long nMax = rParameters.find(
"TO")->second.toInt32();
775 else if (rAction ==
"CLEAR")
808 if(get_top_parent(
mxEdit)->get_id().isEmpty()){
810 return "Select in '" +
812 "' {\"FROM\": \"" + OUString::number(nMin) +
"\", \"TO\": \"" +
813 OUString::number(nMax) +
"\"}"
816 return "Select in '" +
818 "' {\"FROM\": \"" + OUString::number(nMin) +
"\", \"TO\": \"" +
819 OUString::number(nMax) +
"\"} from "
820 + get_top_parent(
mxEdit)->get_id()
829 return "EditUIObject";
834 Edit* pEdit =
dynamic_cast<Edit*
>(pWindow);
836 return std::unique_ptr<UIObject>(
new EditUIObject(pEdit));
852 bool bHandled =
true;
853 if (rAction ==
"TYPE")
856 aChildObj.
execute(rAction, rParameters);
858 else if (rAction ==
"SELECT")
860 if (rParameters.find(
"FROM") != rParameters.end() &&
861 rParameters.find(
"TO") != rParameters.end())
863 tools::Long nMin = rParameters.find(
"FROM")->second.toInt32();
864 tools::Long nMax = rParameters.find(
"TO")->second.toInt32();
890 return "MultiLineEditUIObject";
902 , mxExpander(xExpander)
912 if (rAction ==
"EXPAND")
916 else if (rAction ==
"COLLAPSE")
933 return "ExpanderUIObject";
939 assert(pVclExpander);
945 mxCheckBox(xCheckbox)
956 if (rAction ==
"CLICK")
975 return "CheckBoxUIObject";
982 if(get_top_parent(
mxCheckBox)->get_id().isEmpty()){
1002 mxRadioButton(xRadioButton)
1013 if (rAction ==
"CLICK")
1032 return "RadioButtonUIObject";
1053 assert(pRadioButton);
1082 return "TabPageUIObject";
1105 if (rAction ==
"SELECT")
1107 bool bSelect =
true;
1108 if (rParameters.find(
"POS") != rParameters.end())
1110 auto itr = rParameters.find(
"POS");
1111 OUString aVal = itr->second;
1112 sal_Int32
nPos = aVal.toInt32();
1115 else if (rParameters.find(
"TEXT") != rParameters.end())
1117 auto itr = rParameters.find(
"TEXT");
1118 OUString aText = itr->second;
1142 return "ListBoxUIObject";
1150 if(get_top_parent(
mxListBox)->get_id().isEmpty()){
1152 return "Select element with position " + OUString::number(
nPos) +
1155 return "Select element with position " + OUString::number(
nPos) +
1160 if(get_top_parent(
mxListBox)->get_id().isEmpty())
1166 " Parent:" + get_top_parent(
mxListBox)->get_id();
1181 mxComboBox(xComboBox)
1192 if (rAction ==
"SELECT")
1194 if (rParameters.find(
"POS") != rParameters.end())
1196 auto itr = rParameters.find(
"POS");
1197 OUString aVal = itr->second;
1198 sal_Int32
nPos = aVal.toInt32();
1201 else if(rParameters.find(
"TEXT") != rParameters.end()){
1202 auto itr = rParameters.find(
"TEXT");
1203 OUString aVal = itr->second;
1209 else if ( rAction ==
"TYPE" || rAction ==
"SET" || rAction ==
"CLEAR" ){
1214 pObj->execute(rAction, rParameters);
1233 return "ComboBoxUIObject";
1241 if (get_top_parent(
mxComboBox)->get_id().isEmpty()){
1244 "' ComboBox item number " + OUString::number(
nPos);
1247 "' ComboBox item number " + OUString::number(
nPos) +
1248 " from " + get_top_parent(
mxComboBox)->get_id();
1263 mxSpinButton(xSpinButton)
1274 if (rAction ==
"UP")
1278 else if (rAction ==
"DOWN")
1315 return "SpinUIObject";
1320 mxSpinField(xSpinField)
1331 if (rAction ==
"UP")
1335 else if (rAction ==
"DOWN")
1339 else if (rAction ==
"TYPE")
1345 aSubObject.
execute(rAction, rParameters);
1363 if(get_top_parent(
mxSpinField)->get_id().isEmpty())
1369 "' from " + get_top_parent(
mxSpinField)->get_id();
1373 if(get_top_parent(
mxSpinField)->get_id().isEmpty())
1379 "' from " + get_top_parent(
mxSpinField)->get_id();
1387 return "SpinFieldUIObject";
1400 mxMetricField(xMetricField)
1411 if (rAction ==
"VALUE")
1413 auto itPos = rParameters.find(
"VALUE");
1414 if (itPos != rParameters.end())
1433 return "MetricFieldUIObject";
1439 assert(pMetricField);
1445 mxFormattedField(xFormattedField)
1456 if (rAction ==
"VALUE")
1458 auto itPos = rParameters.find(
"VALUE");
1459 if (itPos != rParameters.end())
1478 return "FormattedFieldUIObject";
1484 assert(pFormattedField);
1490 mxTabControl(xTabControl)
1501 if (rAction ==
"SELECT")
1503 if (rParameters.find(
"POS") != rParameters.end())
1505 auto itr = rParameters.find(
"POS");
1506 sal_uInt32
nPos = itr->second.toUInt32();
1548 return "TabControlUIObject";
1554 assert(pTabControl);
1560 mxRoadmapWizard(xRoadmapWizard)
1571 if (rAction ==
"SELECT")
1573 if (rParameters.find(
"POS") != rParameters.end())
1575 auto itr = rParameters.find(
"POS");
1576 sal_uInt32
nPos = itr->second.toUInt32();
1595 return "RoadmapWizardUIObject";
1601 assert(pRoadmapWizard);
1607 mxTabControl(xTabControl)
1618 if (rAction ==
"SELECT")
1620 if (rParameters.find(
"POS") != rParameters.end())
1622 auto itr = rParameters.find(
"POS");
1623 sal_uInt32
nPos = itr->second.toUInt32();
1646 return "VerticalTabControlUIObject";
1652 assert(pTabControl);
1670 if (rAction ==
"CLICK")
1672 if (rParameters.find(
"POS") != rParameters.end())
1674 auto itr = rParameters.find(
"POS");
1675 sal_uInt16
nPos = itr->second.toUInt32();
1708 return "ToolBoxUIObject";
1720 mxMenuButton(xMenuButton)
1739 if (rAction ==
"CLICK")
1744 else if (rAction ==
"OPENLIST")
1748 else if (rAction ==
"OPENFROMLIST")
1750 auto itr = rParameters.find(
"POS");
1751 sal_uInt32
nPos = itr->second.toUInt32();
1758 else if (rAction ==
"CLOSELIST")
1768 return "MenuButtonUIObject";
1774 assert(pMenuButton);
1792 if (rAction ==
"CLICK")
1795 if (rParameters.find(
"POSX") != rParameters.end() &&
1796 rParameters.find(
"POSY") != rParameters.end())
1798 auto aPosX = rParameters.find(
"POSX");
1799 auto aPosY = rParameters.find(
"POSY");
1804 if (!sPosX2.isEmpty() && !sPoxY2.isEmpty())
1806 double fPosX = std::atof(sPosX2.getStr());
1807 double fPosY = std::atof(sPoxY2.getStr());
1825 assert(pVclDrawingArea);
1840 OUString* pId =
static_cast<OUString*
>(pEntry->
GetUserData());
1842 aMap[
"SelectedItemId"] = *pId;
1846 aMap[
"SelectedItemPos"] = OUString::number(pModel->
GetAbsPos(pEntry));
1853 return "IconViewUIObject";
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
virtual ~CheckBoxUIObject() override
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
CheckBoxUIObject(const VclPtr< CheckBox > &xCheckbox)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
VclPtr< CheckBox > mxCheckBox
virtual OUString get_name() const override
SAL_DLLPRIVATE void ImplCheck()
bool IsTriStateEnabled() const
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual OUString get_name() const override
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual ~ComboBoxUIObject() override
VclPtr< ComboBox > mxComboBox
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
ComboBoxUIObject(const VclPtr< ComboBox > &xListBox)
A widget used to choose from a list of items and which has an entry.
sal_Int32 GetEntryPos(std::u16string_view rStr) const
sal_Int32 GetEntryCount() const
sal_Int32 GetSelectedEntryPos(sal_Int32 nSelIndex=0) const
void SelectEntryPos(sal_Int32 nPos, bool bSelect=true)
virtual OUString GetDisplayText() const override
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
VclPtr< Dialog > mxDialog
virtual OUString get_name() const override
virtual ~DialogUIObject() override
DialogUIObject(const VclPtr< Dialog > &xDialog)
bool IsModalInputMode() const
virtual ~DrawingAreaUIObject() override
VclPtr< VclDrawingArea > mxDrawingArea
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
weld::CustomWidgetController * mpController
DrawingAreaUIObject(const VclPtr< vcl::Window > &rDrawingArea)
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
EditUIObject(const VclPtr< Edit > &xEdit)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual ~EditUIObject() override
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
virtual OUString get_name() const override
virtual void SetText(const OUString &rStr) override
virtual sal_Int32 GetMaxTextLen() const
virtual const Selection & GetSelection() const
Edit * GetSubEdit() const
virtual void SetSelection(const Selection &rSelection)
virtual void KeyInput(const KeyEvent &rKEvt) override
virtual OUString GetSelected() const
virtual OUString GetText() const override
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual ~ExpanderUIObject() override
VclPtr< VclExpander > mxExpander
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual OUString get_name() const override
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
ExpanderUIObject(const VclPtr< VclExpander > &xExpander)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
IconViewUIObject(const VclPtr< SvTreeListBox > &xIconView)
virtual OUString get_name() const override
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual ~ListBoxUIObject() override
virtual OUString get_name() const override
VclPtr< ListBox > mxListBox
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
ListBoxUIObject(const VclPtr< ListBox > &xListBox)
A widget used to choose from a list of items and which has no entry.
bool IsMultiSelectionEnabled() const
sal_Int32 GetSelectedEntryCount() const
sal_Int32 GetEntryCount() const
void SelectEntryPos(sal_Int32 nPos, bool bSelect=true)
sal_Int32 GetSelectedEntryPos(sal_Int32 nSelIndex=0) const
void SelectEntry(std::u16string_view rStr, bool bSelect=true)
OUString GetSelectedEntry(sal_Int32 nSelIndex=0) const
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
VclPtr< MetricField > mxMetricField
virtual ~MetricFieldUIObject() override
virtual OUString get_name() const override
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
MetricFieldUIObject(const VclPtr< MetricField > &xEdit)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual OUString get_name() const override
MultiLineEditUIObject(const VclPtr< VclMultiLineEdit > &xEdit)
virtual ~MultiLineEditUIObject() override
VclPtr< VclMultiLineEdit > mxEdit
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
constexpr tools::Long Y() const
constexpr tools::Long X() const
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
RoadmapWizardUIObject(const VclPtr< vcl::RoadmapWizard > &xRoadmapWizard)
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual OUString get_name() const override
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual ~RoadmapWizardUIObject() override
VclPtr< vcl::RoadmapWizard > mxRoadmapWizard
constexpr tools::Long Height() const
constexpr tools::Long Width() const
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
SpinFieldUIObject(const VclPtr< SpinField > &xEdit)
VclPtr< SpinField > mxSpinField
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
virtual OUString get_name() const override
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual ~SpinFieldUIObject() override
virtual OUString get_name() const override
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
SpinUIObject(const VclPtr< SpinButton > &xSpinButton)
VclPtr< SpinButton > mxSpinButton
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual ~SpinUIObject() override
SvTreeListEntry * FirstSelected() const
SvTreeList * GetModel() const
void * GetUserData() const
sal_uInt32 GetAbsPos(const SvTreeListEntry *pEntry) const
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
TabControlUIObject(const VclPtr< TabControl > &mxTabControl)
virtual ~TabControlUIObject() override
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
VclPtr< TabControl > mxTabControl
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual OUString get_name() const override
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
sal_uInt16 GetPageCount() const
std::vector< sal_uInt16 > GetPageIDs() const
sal_uInt16 GetPagePos(sal_uInt16 nPageId) const
void SelectTabPage(sal_uInt16 nPageId)
sal_uInt16 GetCurPageId() const
virtual OUString get_name() const override
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
TabPageUIObject(const VclPtr< TabPage > &xTabPage)
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual ~TabPageUIObject() override
VclPtr< SvTreeListBox > mxTreeList
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual OUString get_action(VclEventId nEvent) const
Gets the corresponding Action string for the event.
virtual std::unique_ptr< UIObject > get_child(const OUString &rID)
Returns the child of the current UIObject with the corresponding id.
virtual OUString dumpHierarchy() const
Currently an internal method to dump the parent-child relationship starting from the current top focu...
virtual void execute(const OUString &rAction, const StringMap &rParameters)
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual std::set< OUString > get_children() const
Returns a set containing all descendants of the object.
virtual OUString dumpState() const
Currently an internal method to dump the state of the current UIObject as represented by get_state().
virtual StringMap get_state()
Returns the state of the wrapped UI object as a string key value map.
virtual OUString get_type() const
Returns the type of the UIObject.
void setAppName(OUString name)
static UITestLogger & getInstance()
void * GetUserData() const
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
bool get_expanded() const
void set_expanded(bool bExpanded)
virtual OUString GetSelected() const override
virtual sal_Int32 GetMaxTextLen() const override
virtual void SetSelection(const Selection &rSelection) override
OUString GetText() const override
TextWindow * GetTextWindow()
reference_type * get() const
Get the body.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual OUString get_name() const override
VerticalTabControlUIObject(const VclPtr< VerticalTabControl > &mxTabControl)
virtual ~VerticalTabControlUIObject() override
VclPtr< VerticalTabControl > mxTabControl
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
void SetCurPageId(const OUString &rId)
sal_uInt16 GetPagePos(std::u16string_view rPageId) const
const OUString & GetCurPageId() const
OUString GetPageText(std::u16string_view rPageId) const
sal_uInt16 GetPageCount() const
const OUString & GetPageId(sal_uInt16 nIndex) const
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual std::set< OUString > get_children() const override
Returns a set containing all descendants of the object.
virtual OUString get_type() const override
Returns the type of the UIObject.
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
WindowUIObject(const VclPtr< vcl::Window > &xWindow)
VclPtr< vcl::Window > mxWindow
virtual OUString dumpHierarchy() const override
Currently an internal method to dump the parent-child relationship starting from the current top focu...
virtual OUString dumpState() const override
Currently an internal method to dump the state of the current UIObject as represented by get_state().
virtual std::unique_ptr< UIObject > get_child(const OUString &rID) override
Returns the child of the current UIObject with the corresponding id.
std::unique_ptr< UIObject > get_visible_child(const OUString &rID)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual OUString get_name() const
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
int GetCurrentRoadmapItemID() const
void SelectRoadmapItemByID(int nId, bool bGrabFocus=true)
bool IsReallyVisible() const
vcl::Window * GetParent() const
bool HasChildPathFocus(bool bSystemWindow=false) const
const OUString & get_id() const
Get the ID of the window.
sal_uInt16 GetChildCount() const
WindowType GetType() const
bool SupportsDoubleBuffering() const
Can the widget derived from this Window do the double-buffering via RenderContext properly?
virtual Point GetPosPixel() const
virtual void KeyInput(const KeyEvent &rKEvt)
virtual OUString GetDisplayText() const
void RequestDoubleBuffering(bool bRequest)
Enable/disable double-buffering of the frame window and all its children.
virtual Size GetSizePixel() const
Size GetOutputSizePixel() const
virtual OUString GetText() const
const OUString & GetQuickHelpText() const
vcl::Window * GetChild(sal_uInt16 nChild) const
virtual FactoryFunction GetUITestFactory() const
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
constexpr sal_uInt16 KEY_RETURN
constexpr sal_uInt16 KEY_0
constexpr sal_uInt16 KEY_F2
constexpr sal_uInt16 KEY_F3
constexpr sal_uInt16 KEY_ESCAPE
constexpr sal_uInt16 KEY_HOME
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_F4
constexpr sal_uInt16 KEY_F5
constexpr sal_uInt16 KEY_PAGEDOWN
constexpr sal_uInt16 KEY_TAB
constexpr sal_uInt16 KEY_F6
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_F10
constexpr sal_uInt16 KEY_F9
constexpr sal_uInt16 KEY_F7
constexpr sal_uInt16 KEY_F1
constexpr sal_uInt16 KEY_A
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_DELETE
constexpr sal_uInt16 KEY_F8
constexpr sal_uInt16 KEY_F12
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_SPACE
constexpr sal_uInt16 KEY_PAGEUP
constexpr sal_uInt16 KEY_F11
constexpr sal_uInt16 KEY_INSERT
constexpr sal_uInt16 KEY_BACKSPACE
constexpr sal_uInt16 KEY_END
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
std::vector< OUString > split(std::u16string_view rStr, sal_Unicode cSeparator)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
HashMap_OWString_Interface aMap
WinBits const WB_SYSTEMFLOATWIN
std::map< OUString, OUString > StringMap