코딩 된 UI를 사용하여 알림 표시 줄 텍스트를 읽는 방법. 알림 표시 줄 및 알림 텍스트를 기록하지만 알림 표시 줄 텍스트를 읽을 수 없으며 알림 텍스트 강조 표시를 만들지 만 텍스트를 읽을 수 없으면 텍스트를 읽을 수 있습니까?알림 바 텍스트? 코드화 된 UI 사용?
[GeneratedCode("Coded UITest Builder", "12.0.31101.0")]
public class UINotificationToolBar : WinToolBar
{
public UINotificationToolBar(UITestControl searchLimitContainer) :
base(searchLimitContainer)
{
#region Search Criteria
this.SearchProperties[WinToolBar.PropertyNames.Name] = "Notification";
this.WindowTitles.Add("Send with Options");
#endregion
}
#region Properties
public WinText NotificationbarTextText
{
get
{
if ((this.mNotificationbarTextText == null))
{
this.mNotificationbarTextText = new WinText(this);
#region Search Criteria
this.mNotificationbarTextText.SearchProperties[WinText.PropertyNames.Name] = "Notification bar Text";
this.mNotificationbarTextText.WindowTitles.Add("Send with Options");
#endregion
}
return this.mNotificationbarTextText;
}
}
#endregion
#region Fields
private WinText mNotificationbarTextText;
#endregion
}
컨트롤은 우리가 올바르게 대답하는 창 Contrls이
를이 내 코드입니다 : toolBar.NotificationbarTextText.Find(); string s = toolBar.NotificationbarTextText.DisplayText.ToString(); null이 반환됩니다. –
녹음 및 재생 옵션의 검사기를 사용하여 캡처 할 텍스트가있는 컨트롤에 착륙 할 때까지 컨트롤 트리를 탐색 할 수 있습니다. 레코드를 켜고 재생하고, 노우 피티 티 바 위에 마우스를 놓고 Ctrl + Shift + I (대문자 i)를 누릅니다. 알림 바가 선택됩니다. 그런 다음 컨트롤 패널의 위쪽에는 위쪽, 오른쪽, 아래쪽 및 왼쪽 화살표가있는 컨트롤 탐색 아이콘이 있습니다. 이렇게하면 실제 텍스트가있는 컨트롤을 찾을 때까지 이동할 수 있습니다. – MPavlak