libaurum: Add window events for automate script 16/292016/2 accepted/tizen/unified/20230427.155836
authorWoochan Lee <wc0917.lee@samsung.com>
Wed, 26 Apr 2023 07:39:16 +0000 (16:39 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Wed, 26 Apr 2023 07:42:10 +0000 (16:42 +0900)
+ Add require libraries for image processing.

Change-Id: I45b3f97beca90f64024d4789cf5ed6f75488faf0

libaurum/src/UiDevice.cc
org.tizen.aurum-bootstrap/src/Commands/ActionAndWaitEventCommand.cc
protocol/aurum.proto
protocol/resources/python/requirements.txt

index a8f40e7..9f162a0 100644 (file)
@@ -150,10 +150,16 @@ bool UiDevice::waitForEvents(
 bool UiDevice::executeAndWaitForEvents
     (const Runnable *cmd, const A11yEvent type, const int timeout, const std::string packageName, const int count)  const
 {
+    std::vector<std::shared_ptr<AccessibleNode>> wins;
+
     //FIXME: Need to get top window
-    auto wins = this->getWindowRoot();
+    if (type != A11yEvent::EVENT_NONE &&  (A11yEvent::EVENT_WINDOW_RENDER_POST & type) == type)
+    {
+        wins = this->getWindowRoot();
+        return AccessibleWatcher::getInstance()->executeAndWaitForEvents(cmd, type, timeout, packageName, wins[0], count);
+    }
 
-    return AccessibleWatcher::getInstance()->executeAndWaitForEvents(cmd, type, timeout, packageName, wins[0], count);
+    return AccessibleWatcher::getInstance()->executeAndWaitForEvents(cmd, type, timeout, packageName, NULL, count);
 }
 
 bool UiDevice::sendKeyAndWaitForEvents(
index 3439879..d31ed8e 100644 (file)
@@ -36,6 +36,10 @@ A11yEvent convertEventType(const ::aurum::ReqActionAndWaitEvent_EventType type)
         return A11yEvent::EVENT_WINDOW_DEACTIVATE;
     else if (type == ::aurum::ReqActionAndWaitEvent_EventType::ReqActionAndWaitEvent_EventType_EVENT_WINDOW_IDLE)
         return A11yEvent::EVENT_WINDOW_RENDER_POST;
+    else if (type == ::aurum::ReqActionAndWaitEvent_EventType::ReqActionAndWaitEvent_EventType_EVENT_WINDOW_MINIMIZE)
+        return A11yEvent::EVENT_WINDOW_MINIMIZE;
+    else if (type == ::aurum::ReqActionAndWaitEvent_EventType::ReqActionAndWaitEvent_EventType_EVENT_WINDOW_RAISE)
+        return A11yEvent::EVENT_WINDOW_RAISE;
     else
         return A11yEvent::EVENT_STATE_CHANGED_FOCUSED;
 }
index 7fd3338..eac2b9b 100644 (file)
@@ -591,8 +591,10 @@ message ReqActionAndWaitEvent {
    enum EventType {
       EVENT_WINDOW_ACTIVATE = 0;
       EVENT_WINDOW_DEACTIVATE = 1;
-      EVENT_STATE_CHANGED_FOCUSED = 2;
-      EVENT_WINDOW_IDLE = 3;
+      EVENT_WINDOW_MINIMIZE = 2;
+      EVENT_WINDOW_RAISE = 3;
+      EVENT_WINDOW_IDLE = 4;
+      EVENT_STATE_CHANGED_FOCUSED = 5;
    }
    ActionType type = 1;
    oneof params {
@@ -657,4 +659,4 @@ message ReqSetXMLSync {
 
 message RspSetXMLSync {
    RspStatus status = 1;
-}
\ No newline at end of file
+}