-
Notifications
You must be signed in to change notification settings - Fork 79
Appium server abort after find element by ai: search #5
Comments
It seems the node-canvas problem Automattic/node-canvas#1252. |
@NozomiIto : I ran this current script pass on IOS 11.4 but for 12.0 is failed. |
@cuhavp What is your node.js version? |
hi @NozomiIto version of node JS is v10.12.0 |
How about trying node.js 8.12.0 (node.js LTS lastest version) or node.js 11.0.0 (latest version)? |
My setup: ai: installed via - npm install -g test-ai-classifier Appium Log:
Mocha Error Log:
|
@NozomiIto worked fine after installing, |
I am getting the similar error even after trying all these. |
I am getting the following error: FAILED: testFindElementUsingAI ===============================================
|
Log
[HTTP] {"using":"-custom","value":"ai:search"}
[debug] [W3C (064ec6c5)] Calling AppiumDriver.findElement() with args: ["-custom","ai:search","064ec6c5-762b-4a34-a690-67e65723dbaa"]
[debug] [XCUITest] Executing command 'findElement'
[debug] [BaseDriver] Find plugin 'ai' requested; will attempt to use it from 'test-ai-classifier'
2018-10-22 14:04:32.445983: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.2 AVX AVX2 FMA
[debug] [BaseDriver] Waiting up to 0 ms for condition
[ai] Retrieving current settings to check element response attributes
(node:7264) Warning: N-API is an experimental feature and could change at any time.
[ai] We will need to update settings to include element response attributes
[debug] [JSONWP Proxy] Matched '/appium/settings' to command name 'updateSettings'
[debug] [JSONWP Proxy] Proxying [POST /appium/settings] to [POST http://localhost:8100/session/F7F716B2-E1BC-4C5E-81E2-B680BEB1E917/appium/settings] with body: {"settings":{"elementResponseAttributes":"rect"}}
[debug] [JSONWP Proxy] Got response with status 200: {"value":{"elementResponseAttributes":"rect","shouldUseCompactResponses":false},"sessionId":"F7F716B2-E1BC-4C5E-81E2-B680BEB1E917","status":0}
[ai] Setting confidence threshold to default value of 0.2
[ai] Retrieving data for all leaf-node elements on screen
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [JSONWP Proxy] Matched '/elements' to command name 'findElements'
[debug] [JSONWP Proxy] Proxying [POST /elements] to [POST http://localhost:8100/session/F7F716B2-E1BC-4C5E-81E2-B680BEB1E917/elements] with body: {"using":"xpath","value":"//[not(child::)]"}
[debug] [JSONWP Proxy] Got response with status 200: {"value":[{"ELEMENT":"03000000-0000-0000-2B1D-000000000000","rect":{"y":20,"x":0,"width":44,"height":44}},{"ELEMENT":"19000000-0000-0000-2B1D-000000000000","rect":{"y":30,"x":159,"width":57,"height":24}},{"ELEMENT":"1A000000-0000-0000-2B1D-000000000000","rect":{"y":20,"x":310,"width":57,"height":44}},{"ELEMENT":"1E000000-0000-0000-2B1D-000000000000","rect":{"y":33,"x":0,"width":93,"height":94}},{"ELEMENT":"27000000-0000-0000-2B1D-000000000000","rect":{"y":72,"x":16,"width":319,"height":24}},{"ELEMENT":"28000000-0000-0000-2B1D-000000000000","rect":{"y":95,"x":118,"width":104,"height":20}},{"ELEMENT":"29000000-0000-0000-2B1D-000000000000","rect":{"y":95,"x":16,"width":82,"height":20}},{"ELEMENT":"2A000000-0000-0000-2B1D-000000000000","rect":{"y":144,"x":16,"width":319,"height":24}},{"ELEMENT":"2B000000-0000-0000-2B1D-000000000000","rect":{"y":167,"x":118,"width":84,"height":20}},{"ELEMENT":"2C000000-0000-0000-2B1D-000000000000","rect":{"y":167,"x":16,"width":82,"height":20}},{"ELEMENT":"21000000-0000-0000-2B...
[ai] Getting window size in case we need to scale screenshot
[ai] Getting screenshot to use for classifier
[debug] [XCUITest] Taking screenshot with WDA
[debug] [JSONWP Proxy] Matched '/screenshot' to command name 'getScreenshot'
[debug] [JSONWP Proxy] Proxying [GET /screenshot] to [GET http://localhost:8100/session/F7F716B2-E1BC-4C5E-81E2-B680BEB1E917/screenshot] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\n "value" : "iVBORw0KGgoAAAANSUhEUgAAAu4AAAU2CAIAAABFtaRRAAAAAXNSR0IArs4c6QAA\r\nABxpRE9UAAAAAgAAAAAAAAKbAAAAKAAAApsAAAKbAAOCmQOFTr0AAEAASURBVHgB\r\n7J0HnCRFucCXnHPQJ6CCiooBfWJ6ZkTCkQQFJR\/HwZEPuMwdIPBUeChwOcIhIAIC\r\nIuEkSOZId3BwcfNO3pnZvLOTQ71\/9bfb19czPTtzt4vc0fWrX23111VfVdd2Vf\/7\r\nq6qemniVLpFIlfTxeNLBV1dAompXuj4lK2kI+wtIDriU4QaO7H8TyXRVPplMV+Wl\r\n9MrDZCozrN6sSdp1bgu4LeC2gNsCm3MLZFLZdDoby+Z7c9rHM\/lcKq0SSdUXV319\r\nKtGnkvF0Jp7KpBPaZ4lU5TsL2Z58lryZVDqfTOIzaVGoQ+K5FGEyneappYsYPldT\r\nHWjE406I4MAx8E11rmqScUArp3qa+q3MwvPbemiNV8UxJK6KY0hsokOFkWHlGJSb\r\n1Ri+e87V7LaA2wJuC7gt8CG0QC6pUSaRyUMzeCLAjUqkVTyufSKeT8WFM1LpLDRS\r\nbZXgmFhOAxCElE9qmhkAF\/2kIq59SmvVhJSmMsPlNhuUESAyQcQS2VSrjBVciuMu\r\nygzXrefqdVvAbQG3BdwWGM4WyCezmmZSGmIS6QIhcSSCHblUP2eAO8jTqQKnqvIG\r\nnegsFKQSWm0\/uGgw0l5r7leuix6+a60aZZytL8M7wWTadiwQI1EXZYZyysm1ygxf\r\nZ3M1uy3gtoDbAh9mCxjIktXTTKk8dhNQhnCAMMyKmLShUUbop8JQ9JNYPNkBF\/Rr\r\ncjK8tvRoSMIapL1Z5JBHavocnIkORREnZHGSFynYZMGGNLORKCNKis0wNolrlRny\r\ne85V6La...
[ai] Turning screenshot into HTML image for use with canvas
dyld: lazy symbol binding failed: Symbol not found: __ZN2v87Isolate19CheckMemoryPressureEv
Referenced from: /usr/local/lib/node_modules/test-ai-classifier/node_modules/canvas/build/Release/canvas.node
Expected in: flat namespace
dyld: Symbol not found: __ZN2v87Isolate19CheckMemoryPressureEv
Referenced from: /usr/local/lib/node_modules/test-ai-classifier/node_modules/canvas/build/Release/canvas.node
Expected in: flat namespace
Code
@BeforeTest
public void setUp() throws IOException {
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("platformName", "iOS");
caps.setCapability("platformVersion", "12.0");
caps.setCapability("deviceName", "iPhone 6");
caps.setCapability("bundleId", BUNDLE_ID);
}
@AfterTest
public void tearDown() {
try {
driver.quit();
} catch (Exception ign) {
}
}
@test
public void testFindElementUsingAI() {
// find and click on the search button using the classifier
driver.findElement(search).click();
}
The text was updated successfully, but these errors were encountered: