macaca icon indicating copy to clipboard operation
macaca copied to clipboard

getProperty()方法获取控件的isVisible属性失败

Open bluesky12345 opened this issue 9 years ago • 2 comments

  • Macaca Version:
    1.2.0

  • Macaca Doctor Logs: bogon:~ ranli$ macaca doctor

    macaca-doctor version: 1.0.28

    Node.js checklist:

    node env: /usr/local/bin/node node version: v7.4.0

    iOS checklist:

    Xcode is installed at: /Applications/Xcode.app/Contents/Developer Xcode Command Line Tools is ready, version: 2343. iproxy[usbmuxd] is installed at: /usr/local/bin/iproxy ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxy

    Android checklist:

    JAVA version is 1.8.0_111 JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home ANDROID_HOME is not set

    Installed driver list:

    ios: 1.0.53

  • Operate System: OS10.11.6

  • Programming Language: java for ios

code: String name = "isVisible"; Element btn = driver.findElementByName("topRecomChannel n@2x"); btn.getProperty(name);

error log: Response content:{"sessionId":"818986e9-c8c6-4eaa-89a7-3f2d9c3ec9fd","value":"[<XCElementSnapshot 0x16762900> valueForUndefinedKey:]: this class is not key value coding-compliant for the key wdIsvisible.\n\n(\n\t0 CoreFoundation 0x21c95ba3 + 150\n\t1 libobjc.A.dylib 0x21452dff objc_exception_throw + 38\n\t2 CoreFoundation 0x21c95895 <re...more response is ignored.. An unknown server-side error occurred while processing the command. 200

bluesky12345 avatar Mar 01 '17 10:03 bluesky12345

https://github.com/macaca-sample/mobile-app-sample-nodejs/commit/f97675d6a263715909822b10bbbbf42146fd1a71

xudafeng avatar Mar 02 '17 03:03 xudafeng

@xudafeng java版是不是还没解决,ios上用的2.0.2版本获取value属性仍然报错。 java.lang.ClassCastException: java.lang.String cannot be cast to com.alibaba.fastjson.JSONObject at macaca.client.commands.Element.getProperty(Element.java:149)

zsmjluo avatar Mar 02 '17 05:03 zsmjluo