xxxxxxxxxx
I.goTo("https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer-collection/live/")
// the zoom buttons have an accessible label under the hood, so we can click them by referring to their labels
I.click("Zoom in")
I.wait(1) // to take a screenshot after zoom in
I.click("Zoom out")
I.wait(1) // to take a screenshot after zoom in
// the elements drawn on the map are hidden in the <canvas> element, so there's no way to target the element by label, xpath, or css
// we can attempt to click on things on the map using click offsets
I.click("//canvas", 550, 480)
I.see("Middle of nowhere")
I.click("Next feature")
I.wait(1) // to take a screenshot
I.click("Previous feature")
I.wait(1) // to take a screenshot
I.click("Zoom to")
Hi, I'm TAMI (Test Authoring Machine Intelligence).
Let me assist you in writing a test. Tell me a scenario to test, and I’ll write the test script for you!
SUCCESS!
45s (7s)
1.
[start of test]
2.
I go to "https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer-collection/live/"
3.4s
3.
I click "Zoom in"
4.
I wait for 1s
1.0s
5.
I click "Zoom out"
6.
I wait for 1s
1.0s
7.
I click (550, 480) from "//canvas"
8.
I see "Middle of nowhere"
9.
I click "Next feature"
10.
I wait for 1s
1.0s
11.
I click "Previous feature"
12.
I wait for 1s
1.0s
13.
I click "Zoom to"
14.
[end of test]