Open pxrgod opened 3 years ago
This is the translated issue:
(Nsdictionary ) AttributeSforeelement: (ID) ELEMENT Attributes: (NSArray ) Attributes { IF ([XCTestaxClient RespondStoselector: @Selector (AttributeSforeelement: attributes: error :)) { NSERROR Error = NIL; // If you execute it, you will exit it. NSDictionary result = [xctestaxclient AttributeSforelement: Element Attributes: Attributes Error: & Error]; Return Result; } Return [XCTestaxClient AttributeSforeelement: Element Attributes: Attributes]; } The mobile phone used is iPhone 11, the system version is 14.2
如果把调用该方法的入参ELEMENT设置为accessiblityelement,崩溃是不会,但是查询不到对应的属性
This is the translated issue comment: @pxrgod
If the incoming parameter Element calling this method is set to AccessiblityElement, the crash is not, but the query is not the corresponding attribute.
(NSDictionary )attributesForElement:(id )element
attributes:(NSArray )attributes {
if ([XCTestAXClient respondsToSelector:@selector(attributesForElement:attributes:error:)]) { NSError error = nil; //执行到此处就异常退出 NSDictionary result = [XCTestAXClient attributesForElement:element attributes:attributes error:&error]; return result; }
return [XCTestAXClient attributesForElement:element attributes:attributes]; } 使用的手机是iphone 11,系统版本是14.2