From: Woochan Lee Date: Wed, 26 Apr 2023 07:39:16 +0000 (+0900) Subject: libaurum: Add window events for automate script X-Git-Tag: accepted/tizen/unified/20230427.155836^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e5d2d9d64e0466026e20e21ed03e3c9c8c12c21;p=platform%2Fcore%2Fuifw%2Faurum.git libaurum: Add window events for automate script + Add require libraries for image processing. Change-Id: I45b3f97beca90f64024d4789cf5ed6f75488faf0 --- diff --git a/libaurum/src/UiDevice.cc b/libaurum/src/UiDevice.cc index a8f40e7..9f162a0 100644 --- a/libaurum/src/UiDevice.cc +++ b/libaurum/src/UiDevice.cc @@ -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> 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( diff --git a/org.tizen.aurum-bootstrap/src/Commands/ActionAndWaitEventCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/ActionAndWaitEventCommand.cc index 3439879..d31ed8e 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/ActionAndWaitEventCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/ActionAndWaitEventCommand.cc @@ -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; } diff --git a/protocol/aurum.proto b/protocol/aurum.proto index 7fd3338..eac2b9b 100644 --- a/protocol/aurum.proto +++ b/protocol/aurum.proto @@ -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 +} diff --git a/protocol/resources/python/requirements.txt b/protocol/resources/python/requirements.txt index 2fef712..14a07d8 100644 --- a/protocol/resources/python/requirements.txt +++ b/protocol/resources/python/requirements.txt @@ -2,3 +2,6 @@ grpcio grpcio-tools protobuf six +numpy +opencv-python +pillow