Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

麻烦帮忙看看XCTestXCAXClientProxy.m文件中的这个方法,每次调用的时候,都会异常退出 #189

Open
pxrgod opened this issue Jun 21, 2021 · 3 comments

Comments

@pxrgod
Copy link

pxrgod commented Jun 21, 2021

(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

@macaca-bot
Copy link
Member

This is the translated issue:


Trouble helps to see this method in the xctestxcaxclientProxy.m file, every time you call, you will abnormally

(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

@pxrgod
Copy link
Author

pxrgod commented Jun 30, 2021

如果把调用该方法的入参ELEMENT设置为accessiblityelement,崩溃是不会,但是查询不到对应的属性

@macaca-bot
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants