Skip to content

Use Aurum as backend instead of UIAutomator#44

Open
pwasowski2 wants to merge 37 commits intoSamsung:masterfrom
pwasowski2:master
Open

Use Aurum as backend instead of UIAutomator#44
pwasowski2 wants to merge 37 commits intoSamsung:masterfrom
pwasowski2:master

Conversation

@pwasowski2
Copy link

This PR makes use of Aurum as the default and only backend for Appium automation on Tizen

pwasowski2 and others added 30 commits June 30, 2021 20:46
Implemented (with tests):
- findElOrEls (used by BaseDriver to implement all findElement*
commands, so they should all work now)
- {start, launch, close}App - new implementation using Aurum instead
of SDB was needed, because connection only works with apps launched
by Aurum
- isStartedApp
From now on, Aurum is the main and only backend used for communication
between the Appium driver implemented in this repo and Tizen target.

This commit removes support for the old backend (UIAutomator).
aurum.proto has changed. Among other changes, messages related to
getAttribute() call were changed (see
https://github.sec.samsung.net/tizen/aurum/issues/1 for details).

This commit updates aurum.proto and getAttribute implementation to keep
up with Aurum implementation.

[Verification] getAttribute() tests in elm-demoo-tizen-mobile-test.js:
               100 % pass rate
* Refactor tests

- use chai asserts everywhere
- use chai-as-promised asserts for promises
- other, minor changes

* Apply suggestions from code review

Co-authored-by: Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>

* Remove unnecessary parentheses

Co-authored-by: Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
* Refactor tests

- use chai asserts everywhere
- use chai-as-promised asserts for promises
- other, minor changes

* Apply suggestions from code review

Co-authored-by: Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>

* Remove unnecessary parentheses

* Implement getElement and getLocationInView with tests

* Implement get{Text, Enabled, Displayed, Selected, Size} and their tests

* Add missing elementSelected() test

* Fix parentheses

Co-authored-by: Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
* Implement getProperty and its tests

* Remove unnecessary import
* Fix calculation of Element's center position

* Round returned coordinates
…Samsung#17)

* Implement restarting Aurum bootstrap app on TizenDriver instantiation

* Update lib/commands/general.js

Co-authored-by: Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>

Co-authored-by: Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
* Update aurum.proto and auto-generated files

* Implement getLocation and its tests
* Finish implementation of find* commands

* Fix findElement, add findElementId and fix tests

Appium requires findElement to return objects of the following form:
{
  ELEMENT: <elementId>
}
This commit fixes findElement to fulfill this requirement, adds a
convenience method findElementId for writing unit tests and fixes
one of unit tests fixtures.
* Update README.md

* Update README.md
* Implement touch{Up, Down, Move} commands

* Add links to specification. Reorder commands

* Make started sequence IDs stack TizenDriver's property

* Implement test for touch{Down, Move, Up}

* Implement click and touchLongClick

* Implement getting screen resolution

* Change TizenDriver.screenResolution property names

* Implement scrolling element into view

* Fix scrollElementIntoView and remove debug log

* Fix bugs scrollElementIntoView and add its tests

* Remove temporary folders after getting screen resolution

* Fix bugs click and add its tests

* Fix bugs in touchLongClick and add its tests

* Implement flick and its tests

* Add missing comments

* Implement setValue, setValueImmediate, replace and clear with tests
* Implement touch{Up, Down, Move} commands

* Add links to specification. Reorder commands

* Make started sequence IDs stack TizenDriver's property

* Implement test for touch{Down, Move, Up}

* Implement click and touchLongClick

* Implement getting screen resolution

* Change TizenDriver.screenResolution property names

* Implement scrolling element into view

* Fix scrollElementIntoView and remove debug log

* Fix bugs scrollElementIntoView and add its tests

* Remove temporary folders after getting screen resolution

* Fix bugs click and add its tests

* Fix bugs in touchLongClick and add its tests

* Implement flick and its tests

* Add missing comments

* Implement performTouch and its tests

* Implement back and its test

* Minor fixes in tests code
* Fix "-tizen aurum" requests factory

* Reimplement touchLongClick to not use longClick() RPC
Some devices, in particular TVs, have /etc/config/model-config.xml's
structure different than expected by the getScreenResolution() method
from lib/tizen-helpers.js. getScreenResolution() won't work for these
devices and throw an exception. We add an option to set resolution
manually for these devices.
Copy link

@lwc0917 lwc0917 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants