0

Hi in my test case i have to click a "link", after that the application will download a ".wav sound file"..After downloading it plays automatically in the Windows media player..I ensured the WMP is in opened state, but my problem is i have to check weather the windows media player is in play mode or not??

I'm writing script in java..

thanks in advance.

Manigandan
  • 5,004
  • 1
  • 28
  • 47

1 Answers1

0

You can start the WMP with some argument, for example /Task NowPlaying might be what you're looking for - WMP Command Line Parameters

You can try clicking blindly on a button/tab (which may or may not be there).

However, there is a WMP API you could use via JNI or JNA. See this or this if the former is too outdated.

Or see Is there a documented JavaScript API for Windows Media Player?

Community
  • 1
  • 1
Petr Janeček
  • 37,768
  • 12
  • 121
  • 145
  • thanks for your response man..It really helpful for me..thanks a lot. – Manigandan Apr 30 '12 at 03:45
  • out of curiosity, which part of the answer was the most helpful? What did you do in the end? – Petr Janeček Apr 30 '12 at 08:39
  • 1
    java.lang.Robot class...i didn't get the solution not yet.but i thanked you because, Before your answered i didn't know about the "Robot class", but now i know something about that and to handle system events. – Manigandan Apr 30 '12 at 12:22