Created
December 12, 2012 22:54
-
-
Save anonymous/4272407 to your computer and use it in GitHub Desktop.
appium iterate sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Friends Button | |
| puts "DEBUG: Friends Button" | |
| buttons = @driver.find_elements(:tag_name, "button") | |
| puts buttons.size | |
| puts Time.now | |
| buttons = buttons.select { |buttons| buttons.attribute("name") == 'Friends' } | |
| puts "clicking " + buttons.first.attribute("name") | |
| buttons.first.click | |
| puts Time.now | |
| ---output ----- | |
| DEBUG: Friends Button | |
| 42 | |
| 2012-12-12 14:07:48 -0800 | |
| clicking Friends | |
| 2012-12-12 14:09:16 -0800 | |
| --- partial server logs --- | |
| .0.0.127.in-addr.arpa - - [12/Dec/2012 14:10:08] "GET /wd/hub/session/127.0.0.1:4723/element/wde155/attribute/name HTTP/1.0" 200 70 | |
| 1.0.0.127.in-addr.arpa - - [12/Dec/2012 14:10:10] "GET /wd/hub/session/127.0.0.1:4723/element/wde156/attribute/name HTTP/1.0" 200 78 | |
| 1.0.0.127.in-addr.arpa - - [12/Dec/2012 14:10:12] "GET /wd/hub/session/127.0.0.1:4723/element/wde157/attribute/name HTTP/1.0" 200 63 | |
| 1.0.0.127.in-addr.arpa - - [12/Dec/2012 14:10:15] "GET /wd/hub/session/127.0.0.1:4723/element/wde158/attribute/name HTTP/1.0" 200 67 | |
| 1.0.0.127.in-addr.arpa - - [12/Dec/2012 14:10:17] "GET /wd/hub/session/127.0.0.1:4723/element/wde159/attribute/name HTTP/1.0" 200 64 | |
| 1.0.0.127.in-addr.arpa - - [12/Dec/2012 14:10:19] "GET /wd/hub/session/127.0.0.1:4723/element/wde160/attribute/name HTTP/1.0" 200 65 | |
| 1.0.0.127.in-addr.arpa - - [12/Dec/2012 14:10:21] "GET /wd/hub/session/127.0.0.1:4723/element/wde161/attribute/name HTTP/1.0" 200 65 | |
| 1.0.0.127.in-addr.arpa - - [12/Dec/2012 14:10:23] "GET /wd/hub/session/127.0.0.1:4723/element/wde157/attribute/name HTTP/1.0" 200 63 | |
| 1.0.0.127.in-addr.arpa - - [12/Dec/2012 14:10:25] "POST /wd/hub/session/127.0.0.1:4723/element/wde157/click HTTP/1.0" 200 57 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment