Skip to content

Instantly share code, notes, and snippets.

Mihai Zuzeac zuzeac

  • Romania
Block or report user

Report or block zuzeac

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zuzeac
zuzeac / gist:53162715d4075697fd3ea96d7269c0ef
Created Feb 12, 2019
latest appium and uiautomator code
View gist:53162715d4075697fd3ea96d7269c0ef
-> /Users/zuzeacm/git/appium/appium-uiautomator2-driver
m06197:appium zuzeacm$ node .
[Appium] Welcome to Appium v1.11.0-beta.3 (REV b5a6088c7ace2ce1b93484936391c35d32e787f5)
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
View gist:ae51ff11cc7a50366935552eceb58495
[RemoteTestNG] detected TestNG version 6.14.3
09:43:48.394 [main] INFO tests.DummyTestClass - Test Configurations loaded.
09:43:48.408 [main] INFO core.AppiumSetup - Building and starting the server:
[Appium] Welcome to Appium v1.11.0-beta.3
[Appium] Non-default server args:
[Appium] port: 32299
[Appium] sessionOverride: true
[Appium] defaultCapabilities: {
[Appium] }
[Appium] Appium REST http interface listener started on 0.0.0.0:32299
View gist:9814bebaae14f7bc6edae60e70733243
06197:appium zuzeacm$ node .
[Appium] Welcome to Appium v1.11.0-beta.3 (REV b5a6088c7ace2ce1b93484936391c35d32e787f5)
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"appActivity":"activity","appPackage":"package","newCommandTimeout":35,"platformVersion":"7.0","automationName":"uiAutomator2","skipDeviceInitialization":true,"skipServerInstallation":true,"platformName":"Android","udid":"ad0617024dac887bac","deviceName":"Android","ignoreUnimportantViews":true},"capabilities":{"firstMatch":[{"appium:appActivity":"activity","appium:appPackage":"package","appium:automationName":"uiAutomator2","appium:deviceName":"Android","appium:ignoreUnimportantViews":true,"appium:newCommandTimeout":35,"platformName":"android","appium:platformVersion":"7.0","skipDeviceInitialization":true,"skipServerInstallation":true,"appium:udid":"ad0617024dac887bac"}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"appActivity":"activity","ap
View gist:574c72b105851abe8b4be7c83d223063
[RemoteTestNG] detected TestNG version 6.14.3
15:50:46.376 [main] INFO tests.DummyTestClass - Test Configurations loaded.
15:50:46.387 [main] INFO core.AppiumSetup - Building and starting the server:
[Appium] Welcome to Appium v1.11.0-beta.3
[Appium] Non-default server args:
[Appium] port: 48891
[Appium] sessionOverride: true
[Appium] defaultCapabilities: {
[Appium] }
[Appium] Appium REST http interface listener started on 0.0.0.0:48891
@zuzeac
zuzeac / gist:6ed7eac98af6c52e731f8a2d32ae6dee
Created Feb 8, 2019
Retro Waiting when keyboard is opened
View gist:6ed7eac98af6c52e731f8a2d32ae6dee
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"a92403cd-ee85-4ef4-9583-7cf609a6e596\",\"status\":0,\"value\":{\"width\":1440,\"height\":168}}"
[debug] [JSONWP Proxy] Matched '/element/e15ea577-1f80-4df3-be38-403e7325c9ef/click' to command name 'click'
[debug] [JSONWP Proxy] Proxying [POST /element/e15ea577-1f80-4df3-be38-403e7325c9ef/click] to [POST http://localhost:8200/wd/hub/session/a92403cd-ee85-4ef4-9583-7cf609a6e596/element/e15ea577-1f80-4df3-be38-403e7325c9ef/click] with body: {"element":"e15ea577-1f80-4df3-be38-403e7325c9ef","x":720,"y":366}
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"a92403cd-ee85-4ef4-9583-7cf609a6e596","status":0,"value":true}
[debug] [W3C] Responding to client with driver.performTouch() result: null
[HTTP] <-- POST /wd/hub/session/98b02c19-a62d-4747-a2d0-ef047c7aabb6/touch/perform 200 118 ms - 14
[HTTP]
[HTTP] --> GET /wd/hub/session/98b02c19-a62d-4747-a2d0-ef047c7aabb6
[HTTP] {}
View Appium log UIA2
debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8202/wd/hub/session/e63cae3a-12db-439a-a52e-8c497b80ddb3/element] with body: {"strategy":"id","selector":"progress_bar","context":"","multiple":false}
[W3C] Encountered internal error running command: {"w3cStatus":400,"jsonwp":{"sessionId":"e63cae3a-12db-439a-a52e-8c497b80ddb3","status":7,"value":"An element could not be located on the page using the given search parameters."}} ProxyRequestError: Could not proxy command to remote server. Original error: 500 - {"sessionId":"e63cae3a-12db-439a-a52e-8c497b80ddb3","status":7,"value":"An element could not be located on the page using the given search parameters."}
[W3C] at JWProxy.proxy$ (C:\Users\zuzeacm\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:152:13)
[W3C] at tryCatch (C:\Users\zuzeacm\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
[35
View log with UiAutomator2
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for invisibility of Located by By.chained({By.id: progress_bar}) (tried for 10 second(s) with 100 milliseconds interval)
at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:81)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:271)
at resources.Utils.waitForElementToDisappear(Utils.java:158)
at tests.InboxTest.verifyButtonsPresenceInInbox(InboxTest.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
View gist:3e9307c5d6d882a2f151dfdbb44ddec0
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.
C:\Users\zuzeacm>taskkill /F /IM node.exe
SUCCESS: The process "node.exe" with PID 8372 has been terminated.
C:\Users\zuzeacm>npm install appium-android-driver
> appium-chromedriver@4.1.0 install C:\Users\zuzeacm\node_modules\appium-chromedriver
> node install-npm.js
View gist:79e2eec6fb808b2941705b7cd14aea1a
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for invisibility of Located by By.chained({By.id: progress_bar}) (tried for 5 second(s) with 500 milliseconds interval)
at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:81)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:271)
at resources.Utils.isElementNotPresent(Utils.java:115)
at tests.InboxTest.verifyButtonsPresenceInInbox(InboxTest.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
@zuzeac
zuzeac / gist:223a3ca03827670753c8273e242572f0
Last active Jun 6, 2018
Appium log log wait until progress bar is no longer visible
View gist:223a3ca03827670753c8273e242572f0
[HTTP] <-- GET /wd/hub/session/a6b41c79-a3e0-4749-9e7a-3420a82bafb2 200 3 ms - 857
[HTTP] --> POST /wd/hub/session/a6b41c79-a3e0-4749-9e7a-3420a82bafb2/element {"using":"id","value":"progress_bar"}
[debug] [MJSONWP] Calling AppiumDriver.findElement() with args: ["id","progress_bar","a6b41c79-a3e0-4749-9e7a-3420a82bafb2"]
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[debug] [BaseDriver] Waiting up to 20000 ms for condition
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"progress_bar","context":"","multiple":false}}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"progress_bar","context":"","multiple":false}}
[debug] [AndroidBootstrap] [BO
You can’t perform that action at this time.