0
내 응용 프로그램에 UITest를 추가하려고하면 계산 된 결과가 테이블 뷰 (스타일 : 오른쪽 세부 정보)로 표시됩니다. 셀 (왼쪽 첫 번째 줄)의 왼쪽에 표시된 'Static Text'를 읽을 수 있었지만 'Right Detail'을 읽는 방법을 결정할 수 없었습니다. 두 번째 줄은 Right Detail 값 (이 예제에서는 2 Points)을 테스트 할 위치를 보여줍니다.Xcode UITest UITableviewcell을 읽으려고합니다. 오른쪽 세부 값
XCTAssert(app.tables.cells.staticTexts["Best of Breed"].exists)
//2 Points
어떤 도움을 주시면 감사하겠습니다.
----- 업데이트 28 7 월 2016 -----
나는 테이블의 셀이 텍스트에서해야 할 때 지정하는 방법을 발견하고 나는 '2 포인트 것을 확인했다 .debugDescription
(String) $R2 = "Attributes: Cell 0x600000364bc0: traits: 8589934593, {{16.0, 95.0}, {343.0, 78.0}}
Element subtree:
→Cell 0x600000364bc0: traits: 8589934593, {{16.0, 95.0}, {343.0, 78.0}}
StaticText 0x6000003651c0: traits: 8589934656, {{31.0, 105.0}, {115.0, 57.5}},
label: \'Best of Breed Best of Winners Winners Bitch\'
StaticText 0x600000365100: traits: 8589934656, {{265.5, 105.0}, {58.5, 19.5}},
label: \'2 Points\'
Path to element:
→Application 0x6000003642c0: {{0.0, 0.0}, {375.0, 667.0}}, label: \'Best of Breed\'
↳Window 0x600000364500: Main Window, {{0.0, 0.0}, {375.0, 667.0}}
↳Other 0x6000003645c0: traits: 8589934592, {{0.0, 0.0}, {375.0, 667.0}}
↳Other 0x600000364380: traits: 8589934592, {{0.0, 0.0"...
,691 '가 구체적 XCTAssert에게 셀
에
XCTAssert(app.tables.element.cells.element(boundBy: 0).staticTexts["Best of Breed Best of Winners Winners Dog"].exists)
XCTAssert(app.tables.element.cells.element(boundBy: 0).staticTexts["2 Points"].exists)
인쇄 app.tables.element.cells.element (0 boundBy)에 존재
는 당신이 그 요소 접근성 라벨 (레이블이 될 수있다)을 줄 수있는 일? 그렇다면 접근성 라벨에 대해 해당 요소에 액세스 해보십시오. – emoleumassi
나는 그걸 연구 할거야 ... 고맙습니다. –