Cast from XCUIElement to unrelated type '[AnyObject]' always fails while fetching JSON

Posted 秋棠枫眠

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Cast from XCUIElement to unrelated type '[AnyObject]' always fails while fetching JSON相关的知识,希望对你有一定的参考价值。

 

before

if let careProviders = providerJSON["care_providers"] as? [AnyObject]

after

if let careProviders = providerJSON["care_providers" as NSString] as? [AnyObject]

 

 

参考:

http://stackoverflow.com/questions/32715160/xcode-7-strange-cast-error-that-refers-to-xcuielement

以上是关于Cast from XCUIElement to unrelated type '[AnyObject]' always fails while fetching JSON的主要内容,如果未能解决你的问题,请参考以下文章

Type safety: Unchecked cast from Object to ArrayList

error: cast from ‘char*’ to ‘int’ loses precision

关于Linux下C编译错误(警告)cast from 'void*' to 'int' loses precision

Appium:原始错误:-[XCUIElement resolve]: unrecognized selector sent to instance

TypeError: Iterator operand 0 dtype could not be cast from dtype('<M8[us]') to dtype('

How to Get Vertical Line from Point and Line