summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/uitest/uiobject.cxx18
1 files changed, 15 insertions, 3 deletions
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 259cb9f40647..737fa9283cf7 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -183,8 +183,14 @@ void WindowUIObject::execute(const OUString& rAction,
}
else if (rAction == "TYPE")
{
- assert(rParameters.find("TEXT") != rParameters.end());
- const OUString& rText = rParameters.find("TEXT")->second;
+ auto itr = rParameters.find("TEXT");
+ if (itr == rParameters.end())
+ {
+ SAL_WARN("vcl.uitest", "missing parameter TEXT to action TYPE");
+ return;
+ }
+
+ const OUString& rText = itr->second;
auto aKeyEvents = generate_key_events_from_text(rText);
for (auto itr = aKeyEvents.begin(), itrEnd = aKeyEvents.end();
itr != itrEnd; ++itr)
@@ -347,7 +353,13 @@ void EditUIObject::execute(const OUString& rAction,
{
if (rParameters.find("TEXT") != rParameters.end())
{
- assert(rParameters.size() == 1); // only the text
+ auto itr = rParameters.find("TEXT");
+ if (itr == rParameters.end())
+ {
+ SAL_WARN("vcl.uitest", "missing parameter TEXT to action SET");
+ return;
+ }
+
const OUString& rText = rParameters.find("TEXT")->second;
auto aKeyEvents = generate_key_events_from_text(rText);
for (auto itr = aKeyEvents.begin(), itrEnd = aKeyEvents.end();