diff options
author | Ahmed ElShreif <aelshreif7@gmail.com> | 2020-08-28 08:25:28 +0200 |
---|---|---|
committer | Ahmed ElShreif <aelshreif7@gmail.com> | 2020-10-13 20:36:45 +0200 |
commit | f558d810de845ad1dd52632ca0a2cae4733ed6e6 (patch) | |
tree | cd2a0e9de79e4020aea72fcac7aab1ddda55dfc4 | |
parent | fefc0dfdcedbd0ef9d32c32be356f8086e756b33 (diff) |
uilogger : Add support in the Logger and DSL for Vertical Tab
For example the DSL syntax will be:
>> Choose Tab number 2 in 'tab_id' from parent_id
We don't need DSL change as it will already handled by normal Tab grammar
Change-Id: I51f294134be88c4ac88baf73c53d81187a023061
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101516
Tested-by: Jenkins
Reviewed-by: Ahmed ElShreif <aelshreif7@gmail.com>
-rw-r--r-- | vcl/source/control/ivctrl.cxx | 17 | ||||
-rw-r--r-- | vcl/source/uitest/logger.cxx | 5 |
2 files changed, 22 insertions, 0 deletions
diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx index 03f820534392..5ce9b84e1f85 100644 --- a/vcl/source/control/ivctrl.cxx +++ b/vcl/source/control/ivctrl.cxx @@ -28,10 +28,26 @@ #include <vcl/tabctrl.hxx> #include <vcl/vclevent.hxx> #include <vcl/uitest/uiobject.hxx> +#include <vcl/uitest/logger.hxx> +#include <vcl/uitest/eventdescription.hxx> #include <verticaltabctrl.hxx> using namespace ::com::sun::star::accessibility; +namespace +{ +void collectUIInformation( const OUString& aID, const OUString& aPos , const OUString& aParent ) +{ + EventDescription aDescription; + aDescription.aID = aID; + aDescription.aParameters = {{ "POS" , aPos}}; + aDescription.aAction = "SELECT"; + aDescription.aParent = aParent; + aDescription.aKeyWord = "VerticalTab"; + UITestLogger::getInstance().logEvent(aDescription); +} +} + /***************************************************************************** | | class : SvxIconChoiceCtrlEntry @@ -521,6 +537,7 @@ void VerticalTabControl::SetCurPageId(const OString& rId) ActivatePage(); pNewData->xPage->Show(); } + collectUIInformation(get_id(),OStringToOUString(m_sCurrentPageId,RTL_TEXTENCODING_UTF8), GetPageParent()->get_id()); } OString VerticalTabControl::GetPageId(sal_uInt16 nIndex) const diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx index d67711422bb6..31e8ea836040 100644 --- a/vcl/source/uitest/logger.cxx +++ b/vcl/source/uitest/logger.cxx @@ -592,6 +592,11 @@ void UITestLogger::logEvent(const EventDescription& rDescription) aLogLine = "Select item no "+ GetValueInMapWithIndex(rDescription.aParameters, 0) +" From List of "+ rDescription.aID; } } + else if(rDescription.aKeyWord == "VerticalTab"){ + aLogLine = "Choose Tab number " + GetValueInMapWithIndex(rDescription.aParameters, 0) + + " in '" + rDescription.aID + + "' from " + rDescription.aParent ; + } else { aLogLine = rDescription.aKeyWord + " Action:" + rDescription.aAction + " Id:" |