... | ... | @@ -64,6 +64,7 @@ Let's write our first test. A simple addition should do. To write selenium tests |
|
|
- description: `self.driver.find_element(by='description', value="Result Display")`
|
|
|
- class name: `self.driver.find_element(by=AppiumBy.CLASS_NAME, value="[push button | AC]")`
|
|
|
- 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)
|
|
|
- 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.
|
|
|
|
|
|
To figure out what to actually look for we can look at at-spi directly. To do this we'll use the tool "accerciser". On the left hand side you can navigate the various accessible elements. On the right hand side you can inspect the element. The most pertinent tab here is 'Interface Viewer', it let's us find most of the locator types as well as inspect interaction options we have in the "Action" group as well as state assertion options in the "States" list view.
|
|
|
|
... | ... | |