IOS?????????????????
???????????? ???????[ 2014/7/2 14:44:21 ] ????????ios ??????? ?????????
??????IOS???????????У????????????????????????????????
????1. ??instruments????????????ЩUI???
????2. ?????????й????ID??????????????????????????????target.frontMostApp().mainWindow().scrollViews()[0].tableViews()[0].cells()[0].tap(); ????????????λ????
???????????????????????????????????????????????????UIView????????????ЩUI??????????????
????1. ???????UI????????
????2. ????Щ???????
????instruments ?????????isAccessibilityElement???????ж???????????
?????????????
????1. ?????UI?????isAccessibilityElement?????YES?????????UI?????isAccessibilityElement??????NO????isAccessibilityElement?NO???instruments??????????????????UI???и????????????????????????????????????? UI????UI??isAccessibilityElement???????YES??????????????UI?????instruments????????
??????
@interface SNCommentHeaderView : UIView
{
UIImageView *headerBgView;
UILabel *titleLabel;
}
- (id)initWithFrame:(CGRect)frame
{
NSLog(@"SNCommentHeaderView_init");
self = [super initWithFrame:frame];
if (self) {
// Initialization code
headerBgView = [[UIImageView alloc] initWithImage:[UIImage skinImageNamed:@"comment_sectionheader_title_bg.png"]];
CGRect bgFrame = headerBgView.frame;
bgFrame.origin.y = 10;
headerBgView.frame = bgFrame;
headerBgView.isAccessibilityElement = YES;
[self addSubview:headerBgView];
titleLabel = [[UILabel alloc] initWithFrame:UIEdgeInsetsInsetRect(bgFrame?? UIEdgeInsetsMake(0?? 0?? 1.5?? 0))];
titleLabel.backgroundColor = [UIColor clearColor];
titleLabel.font = [UIFont fontWithName:BOLD_FONT_NAME size:12];
titleLabel.textAlignment = UITextAlignmentCenter;
titleLabel.textColor = [UIColor skinColorForKey:SNSkinCommentSectionHeaderColor];
titleLabel.isAccessibilityElement = YES;
[self addSubview:titleLabel];
}
return self;
}
|
????2. ???????????UI??instruments??????????????????????????????????????????????UI???????????????????????????λ????????λ???????????????????????????UI?????????????accessibilityIdentifier????accessibilityLabel????????????????????????
??????IOS?????????????target.frontMostApp().mainWindow().scrollViews()[0].tableViews()[0].cells()[0].tap(); ????????λ?????????????????????????仯???????UI??????case???????????????????????????????Щ???????case?й????????????accessibilityIdentifier????????????????accessibilityIdentifier????λ??????????????????????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11