Coded UI Test checking for an open Windows Media Player file

Randy B.

I am trying to create a Coded UI property that checks for an open WMP file.

   public BrowserWindow VideoWindow
    {
        get
        {
            if (this._videoWindow == null || !this._videoWindow.Exists)
            {
                this._videoWindow = new BrowserWindow();
                this._videoWindow.SearchProperties["Name"] = "Windows Media Player";
                this._videoWindow.SearchProperties["ControlType"] = "Window";
            }

            return this._videoWindow;
        }
    }

Obviously, this will not work. Originally, the application opened a link to a video site. So this worked, but since it is quite a bit different than a BrowserWindow I am not sure how to do it. How can I use Coded UI to "grab" it?

Nick Raverty

The only real difference for windows media player from the video site you've been dealing with is that windows media player will be a WpfWindow instead of a BrowserWindow -

public WpfWindow VideoWindow
{
    get
    {
        if (this._videoWindow == null || !this._videoWindow.Exists)
        {
            this._videoWindow = new WpfWindow();
            this._videoWindow.SearchProperties["Name"] = "Windows Media Player";
            this._videoWindow.WindowTitles.Add("Windows Media Player");
        }

        return this._videoWindow;
    }
}

After that, you just have to get the controls inside of the media player window(WpfControls instead of HtmlControls) to determine which file is open.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Windows Media Player 7

분류에서Dev

VLC Media player automatically create a blank duplicate when I open it

분류에서Dev

Windows Media Player 11 + 12, Wine 포함

분류에서Dev

Windows Media Player 11 + 12, Wine 포함

분류에서Dev

스크립팅 및 Windows Media Player 창

분류에서Dev

Creators Update 후 Windows Media Player가 누락 됨

분류에서Dev

Windows Media Player를 호출하는 C # WPF

분류에서Dev

열려있는 Windows Media Player 파일에 대한 코딩 된 UI 테스트 검사

분류에서Dev

Coded UI Test change user causes FatalExecutionEngineError returning a AgentRestart.dat

분류에서Dev

Media Player Classic / Windows Media Player의 사용자 지정 창 크기 설정

분류에서Dev

A full-buffered media player which would load the whole media file

분류에서Dev

Media Player Shoutcast error

분류에서Dev

Windows 8.1 단일 언어에서 Windows Media Player가 누락 됨

분류에서Dev

Make VLC Media Player my default player

분류에서Dev

C # 프로그램에 Windows Media Player 추가

분류에서Dev

Windows Media Player는 어떻게 사용합니까?

분류에서Dev

Windows Media Player 자동 삽입 트랙 정보 재정렬

분류에서Dev

Windows Media Player 파일 아이콘이 사라짐

분류에서Dev

추가 정보를 검색하는 Windows Media Player

분류에서Dev

Windows Media Player가 밀리 초를 표시 할 수 있습니까?

분류에서Dev

Windows Media Player 트랙 건너 뛰기 기간

분류에서Dev

Windows Media Player 새 버전이 오래된 것 같습니다.

분류에서Dev

Windows Media Player-재생 완료 후 플레이어 숨기기

분류에서Dev

Windows Media Player 12를 사용한 자동 볼륨 레벨링

분류에서Dev

DVD playback with Windows Media Player 11 works fine, but when copied to HDD and then played back, the audio stutters

분류에서Dev

Back button not working in Media player

분류에서Dev

Remote Controlled / Network Media Player

분류에서Dev

Debian의 Media Player Classic

분류에서Dev

Interacting with multiple instances of an application in Coded UI

Related 관련 기사

  1. 1

    Windows Media Player 7

  2. 2

    VLC Media player automatically create a blank duplicate when I open it

  3. 3

    Windows Media Player 11 + 12, Wine 포함

  4. 4

    Windows Media Player 11 + 12, Wine 포함

  5. 5

    스크립팅 및 Windows Media Player 창

  6. 6

    Creators Update 후 Windows Media Player가 누락 됨

  7. 7

    Windows Media Player를 호출하는 C # WPF

  8. 8

    열려있는 Windows Media Player 파일에 대한 코딩 된 UI 테스트 검사

  9. 9

    Coded UI Test change user causes FatalExecutionEngineError returning a AgentRestart.dat

  10. 10

    Media Player Classic / Windows Media Player의 사용자 지정 창 크기 설정

  11. 11

    A full-buffered media player which would load the whole media file

  12. 12

    Media Player Shoutcast error

  13. 13

    Windows 8.1 단일 언어에서 Windows Media Player가 누락 됨

  14. 14

    Make VLC Media Player my default player

  15. 15

    C # 프로그램에 Windows Media Player 추가

  16. 16

    Windows Media Player는 어떻게 사용합니까?

  17. 17

    Windows Media Player 자동 삽입 트랙 정보 재정렬

  18. 18

    Windows Media Player 파일 아이콘이 사라짐

  19. 19

    추가 정보를 검색하는 Windows Media Player

  20. 20

    Windows Media Player가 밀리 초를 표시 할 수 있습니까?

  21. 21

    Windows Media Player 트랙 건너 뛰기 기간

  22. 22

    Windows Media Player 새 버전이 오래된 것 같습니다.

  23. 23

    Windows Media Player-재생 완료 후 플레이어 숨기기

  24. 24

    Windows Media Player 12를 사용한 자동 볼륨 레벨링

  25. 25

    DVD playback with Windows Media Player 11 works fine, but when copied to HDD and then played back, the audio stutters

  26. 26

    Back button not working in Media player

  27. 27

    Remote Controlled / Network Media Player

  28. 28

    Debian의 Media Player Classic

  29. 29

    Interacting with multiple instances of an application in Coded UI

뜨겁다태그

보관