Skip to content

[POC] test(gui): gui test automation with appium - #857

Merged
saw-jan merged 8 commits into
test/port-to-appiumfrom
poc/appium-gui-test
Apr 13, 2026
Merged

saw-jan merged 8 commits into
test/port-to-appiumfrom
poc/appium-gui-test

Conversation

@saw-jan

@saw-jan saw-jan commented Mar 31, 2026 •

Copy link
Copy Markdown
Contributor

Part of #861

How to Run the Tests

  1. Get the dependencies:
    sudo apt install xclip python3-pyatspi
    
    cd test/gui
    python3 -m venv venv --system-site-packages
    source venv/bin/activate
    pip install -r requirements.txt
  2. Run the opencloud server
  3. Run the webdriver
    Get the selenium-webdriver-at-spi: git clone https://invent.kde.org/sdk/selenium-webdriver-at-spi.git
    cd <desktop-repo-root>test/gui
    source venv/bin/activate
    FLASK_APP=<path-to-selenium-webdriver-at-spi>/selenium-webdriver-at-spi.py FLASK_ENV=production flask run --port 4723 --no-reload
  4. Create test config file: test/gui/config.ini dir
    [DEFAULT]
    APP_PATH=<full-path-to>/opencloud # desktop app path
    BACKEND_HOST=https://localhost:9200

Important

desktop client MUST be built with qtbase that has QSpiAccessibleBridge implementation
Check: strings <path-to>/libQt6Gui.so | grep -i QSpiAccessibleBridge

  1. Run the test:
    cd <desktop-repo-root>test/gui
    source venv/bin/activate
    behave --tags=smoke features/add-account/account.feature

@saw-jan saw-jan self-assigned this Mar 31, 2026
@saw-jan
saw-jan force-pushed the poc/appium-gui-test branch 3 times, most recently from 8e92203 to 663ee60 Compare March 31, 2026 13:01
@saw-jan
saw-jan force-pushed the poc/appium-gui-test branch from 663ee60 to 3d56a16 Compare April 1, 2026 04:12
@saw-jan
saw-jan changed the base branch from main to test/port-to-appium April 7, 2026 09:35
@saw-jan
saw-jan force-pushed the poc/appium-gui-test branch from 05291d3 to 6c4cfda Compare April 7, 2026 09:39
@saw-jan saw-jan mentioned this pull request Apr 7, 2026
30 tasks done
saw-jan added 2 commits April 8, 2026 12:41
Signed-off-by: Saw-jan <[email protected]>
@saw-jan
saw-jan marked this pull request as ready for review April 8, 2026 07:00
Signed-off-by: Saw-jan <[email protected]>
@prashant-gurung899

prashant-gurung899 commented Apr 8, 2026 •

Copy link
Copy Markdown
Member

I faced the following issue while running the FLASK APP:

image

To resolve it, I had to change the following code in selenium-websdriver-at-spi.py file:

major, minor, _micro = pyatspi.Atspi.get_version()

to:

version = getattr(pyatspi.Atspi, "_version", "0.0.0")
major, minor, *_ = map(int, version.split("."))

@prashant-gurung899

Copy link
Copy Markdown
Member

I faced the following issue while running the FLASK APP:

image To resolve it, I had to change the following code in `selenium-websdriver-at-spi.py` file:
major, minor, _micro = pyatspi.Atspi.get_version()

to:

version = getattr(pyatspi.Atspi, "_version", "0.0.0")
major, minor, *_ = map(int, version.split("."))

I upgraded my ubuntu from 22 to ubuntu 24 and this issue is not there anymore.

@prashant-gurung899 prashant-gurung899 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 🥇

We should have a proper docs for this.

@saw-jan
saw-jan merged commit 6c5faac into test/port-to-appium Apr 13, 2026
0 of 3 checks passed
@saw-jan
saw-jan deleted the poc/appium-gui-test branch April 13, 2026 06:01
saw-jan added a commit that referenced this pull request May 12, 2026
* test(gui): gui test automation with appium

Signed-off-by: Saw-jan <[email protected]>

* test: pin python modules

Signed-off-by: Saw-jan <[email protected]>

* test: fix sync pattern check

Signed-off-by: Saw-jan <[email protected]>

* fix: replace with print

Signed-off-by: Saw-jan <[email protected]>

* ci: disable squish ci pipeline

Signed-off-by: Saw-jan <[email protected]>

* test: use selector as object

Signed-off-by: Saw-jan <[email protected]>

* test: use app

Signed-off-by: Saw-jan <[email protected]>

* test: fix selector

Signed-off-by: Saw-jan <[email protected]>

---------

Signed-off-by: Saw-jan <[email protected]>
saw-jan added a commit that referenced this pull request May 13, 2026
* test(gui): gui test automation with appium

Signed-off-by: Saw-jan <[email protected]>

* test: pin python modules

Signed-off-by: Saw-jan <[email protected]>

* test: fix sync pattern check

Signed-off-by: Saw-jan <[email protected]>

* fix: replace with print

Signed-off-by: Saw-jan <[email protected]>

* ci: disable squish ci pipeline

Signed-off-by: Saw-jan <[email protected]>

* test: use selector as object

Signed-off-by: Saw-jan <[email protected]>

* test: use app

Signed-off-by: Saw-jan <[email protected]>

* test: fix selector

Signed-off-by: Saw-jan <[email protected]>

---------

Signed-off-by: Saw-jan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants