... | ... | @@ -18,6 +18,12 @@ https://invent.kde.org/sdk/selenium-webdriver-at-spi/-/blob/master/examples/calc |
|
|
- Install selenium-webdriver-at-spi dependencies with `pip3 install -r requirements.txt`
|
|
|
- Make sure ~/.local/bin is in your $PATH
|
|
|
|
|
|
## Running Tests
|
|
|
|
|
|
Running tests is best done through cmake respectively ctest when working on an existing code base. For boiler plate logic see for example https://invent.kde.org/plasma/kdeplasma-addons/-/blob/master/appiumtests/CMakeLists.txt
|
|
|
|
|
|
You can also run tests manually. Like so: `selenium-webdriver-at-spi-run ./examples/calculatortest.py`. The run wrapper makes sure the server side components are correctly started and shut down as necessary; it must be used for things to work correctly!
|
|
|
|
|
|
## Test
|
|
|
|
|
|
You can write tests in any language you want. For the purposes of this guide we are going to use python in the hopes that most readers are familiar enough with that language.
|
... | ... | @@ -93,6 +99,3 @@ Let's sketch out a simple addition test. |
|
|
Lastly we'll find the result display element, obtain its text property, and assert it being 8. We now have our first test completed. To run this test we'll simply execute it through the test runner `selenium-webdriver-at-spi-run ./calculatortest.py`
|
|
|
|
|
|
The complete test can be found at https://invent.kde.org/sdk/selenium-webdriver-at-spi/-/blob/master/examples/calculatortest.py |
|
|
|
|
|
## Screenshots
|
|
|
|