mirror of
https://gitee.com/openharmony/accessibility
synced 2024-11-23 06:50:30 +00:00
修改测试用例接口判断
Signed-off-by: zhanghuiyu <zhanghuiyu9@huawei.com>
This commit is contained in:
parent
21e7a486d8
commit
f947827c74
@ -106,8 +106,8 @@ namespace {
|
||||
{
|
||||
while (state.KeepRunning()) {
|
||||
AccessibilityElementInfo elementInfo;
|
||||
bool result = AccessibilityUITestAbility::GetInstance()->GetRoot(elementInfo);
|
||||
if (!result) {
|
||||
int32_t result = AccessibilityUITestAbility::GetInstance()->GetRoot(elementInfo);
|
||||
if (result != 0) {
|
||||
state.SkipWithError("GetRoot failed. Maybe there is no command to set ace");
|
||||
}
|
||||
}
|
||||
@ -124,7 +124,10 @@ namespace {
|
||||
{
|
||||
while (state.KeepRunning()) {
|
||||
std::vector<AccessibilityWindowInfo> windows;
|
||||
AccessibilityUITestAbility::GetInstance()->GetWindows(windows);
|
||||
int32_t result = AccessibilityUITestAbility::GetInstance()->GetWindows(windows);
|
||||
if (result != 0) {
|
||||
state.SkipWithError("GetWindows failed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,7 +163,10 @@ namespace {
|
||||
gesturePath->SetDurationTime(durationTime);
|
||||
AccessibilityGesturePosition position = {200.0f, 200.0f};
|
||||
gesturePath->AddPosition(position);
|
||||
AccessibilityUITestAbility::GetInstance()->InjectGesture(gesturePath);
|
||||
int32_t result = AccessibilityUITestAbility::GetInstance()->InjectGesture(gesturePath);
|
||||
if (result != 0) {
|
||||
state.SkipWithError("InjectGesture failed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user