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 a8f40e7bb2c87b2bad2c0355c7597aa291b46e6d..9f162a01b9a9880881d47f1eacf73c82038b8cf2 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 343987977f6c0f044c625b4e890db02bcd1ca98b..d31ed8ebf864c26f34ef1c06618e171f2d58ec5d 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 7fd33386a396c98375a9555b22118ce8cc652c72..eac2b9bc83be2ef37fa44bc477467a1d00b7b486 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
+}
index 2fef712e3039b2f940ffbff61f77092ec3d5471c..14a07d8c639a1f0d8bcd4ba0404f254b8dc4dbe8 100644 (file)
@@ -2,3 +2,6 @@ grpcio
 grpcio-tools
 protobuf
 six
+numpy
+opencv-python
+pillow