... | ... | @@ -10,10 +10,13 @@ https://invent.kde.org/sdk/selenium-webdriver-at-spi/-/blob/master/examples/calc |
|
|
|
|
|
## Requirements
|
|
|
|
|
|
Basic understanding of how to use `meson`, `cmake`, `autotools`, and `make` to build and install software is expected.
|
|
|
|
|
|
- A supported python3 version (at the time of writing >=3.7)
|
|
|
- https://gitlab.gnome.org/GNOME/at-spi2-core (build & install -- can also use distro packages)
|
|
|
- https://gitlab.gnome.org/GNOME/pyatspi2 (build & install -- can also use distro packages)
|
|
|
- https://gitlab.gnome.org/GNOME/accerciser (build & install -- can also use distro packages)
|
|
|
- https://gitlab.gnome.org/GNOME/at-spi2-core (build & install -- can also use distro packages instead)
|
|
|
- https://gitlab.gnome.org/GNOME/pyatspi2 (build & install -- can also use distro packages instead)
|
|
|
- https://gitlab.gnome.org/GNOME/accerciser (build & install -- can also use distro packages instead)
|
|
|
- https://gitlab.gnome.org/GNOME/gobject-introspection (build & install -- can and should use distro packages instead)
|
|
|
- https://invent.kde.org/sdk/selenium-webdriver-at-spi (build & install)
|
|
|
- Install selenium-webdriver-at-spi dependencies with `pip3 install -r requirements.txt`
|
|
|
- Make sure ~/.local/bin is in your $PATH
|
... | ... | @@ -77,7 +80,7 @@ Let's write our first test. A simple addition should do. To write selenium tests |
|
|
|
|
|
- name: `self.driver.find_element(by=AppiumBy.NAME, value="AC")`
|
|
|
- description: `self.driver.find_element(by='description', value="Result Display")`
|
|
|
- accessibility id: `self.driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value="QGuiApplication.QQuickWindow_QML_28.developerPage")` the ID is constructed from objectNames and the object tree. The id is matched from the end (e.g. in the example value="developerPage" would also match). On the QML side you can also set an objectName when you need to find an Item by its id rather than name or description.
|
|
|
- accessibility id: `self.driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value="QGuiApplication.QQuickWindow_QML_28.developerPage")` the ID is constructed from objectNames and the object tree. The id is matched from the end (e.g. in the example value="developerPage" would also match). On the QML side you can also set an objectName when you need to find an Item by its id rather than name or description; Mind that this requires a Qt 5 Patch Collection build to work correctly.
|
|
|
- class name: `self.driver.find_element(by=AppiumBy.CLASS_NAME, value="[push button | AC]")` the class name is comprised of the `type` and `name`, you can easily find this identifier in accerciser's API Browser tab (combobox might need changing away from the "Accessible").
|
|
|
- xpath: `//dialog[@name="Duplicate?"]//push_button[@name="Yes"]` based on an XML representation of the object tree. The xml may be accessed via `http://127.0.0.1:4723/session/$$SESSION-UUID$$/sourceRaw`. http://xpather.com/ is a useful tool to test xpath queries.
|
|
|
|
... | ... | |